diff --git a/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php b/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php index a0e614025..4ad013fce 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php @@ -9,6 +9,7 @@ use ChampsLibres\AsyncUploaderBundle\Model\AsyncFileInterface; use ChampsLibres\AsyncUploaderBundle\Validator\Constraints\AsyncFileExists; use ChampsLibres\WopiLib\Contract\Entity\Document; use DateTimeInterface; +use Ramsey\Uuid\Rfc4122\UuidInterface; use Ramsey\Uuid\Uuid; use Ramsey\Uuid\UuidInterface; use Symfony\Component\Serializer\Annotation as Serializer; diff --git a/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php b/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php index a6cf08063..1924edd01 100644 --- a/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php +++ b/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php @@ -199,7 +199,7 @@ final class ChillDocumentManager implements DocumentManagerInterface ->createStream($this->getContent($document)); } - private function deleteContent(StoredObject $storedObject): string + private function deleteContent(StoredObject $storedObject): void { /** @var StdClass $object */ $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]); - if (200 !== $response->getStatusCode()) + if (201 !== $response->getStatusCode()) { throw new Error('Unable to save stored object.'); }