mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
26140de7de
@ -9,6 +9,7 @@ use ChampsLibres\AsyncUploaderBundle\Model\AsyncFileInterface;
|
|||||||
use ChampsLibres\AsyncUploaderBundle\Validator\Constraints\AsyncFileExists;
|
use ChampsLibres\AsyncUploaderBundle\Validator\Constraints\AsyncFileExists;
|
||||||
use ChampsLibres\WopiLib\Contract\Entity\Document;
|
use ChampsLibres\WopiLib\Contract\Entity\Document;
|
||||||
use DateTimeInterface;
|
use DateTimeInterface;
|
||||||
|
use Ramsey\Uuid\Rfc4122\UuidInterface;
|
||||||
use Ramsey\Uuid\Uuid;
|
use Ramsey\Uuid\Uuid;
|
||||||
use Ramsey\Uuid\UuidInterface;
|
use Ramsey\Uuid\UuidInterface;
|
||||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||||
|
@ -199,7 +199,7 @@ final class ChillDocumentManager implements DocumentManagerInterface
|
|||||||
->createStream($this->getContent($document));
|
->createStream($this->getContent($document));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function deleteContent(StoredObject $storedObject): string
|
private function deleteContent(StoredObject $storedObject): void
|
||||||
{
|
{
|
||||||
/** @var StdClass $object */
|
/** @var StdClass $object */
|
||||||
$object = $this->tempUrlGenerator->generate('DELETE', $storedObject->getFilename());
|
$object = $this->tempUrlGenerator->generate('DELETE', $storedObject->getFilename());
|
||||||
@ -235,7 +235,7 @@ final class ChillDocumentManager implements DocumentManagerInterface
|
|||||||
|
|
||||||
$response = $this->httpClient->request('PUT', $object->url, ['body' => $content]);
|
$response = $this->httpClient->request('PUT', $object->url, ['body' => $content]);
|
||||||
|
|
||||||
if (200 !== $response->getStatusCode())
|
if (201 !== $response->getStatusCode())
|
||||||
{
|
{
|
||||||
throw new Error('Unable to save stored object.');
|
throw new Error('Unable to save stored object.');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user