Commit 6914cdd1 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

UploadedFileTransformer: il n'est pas nécessaire vérifier la syntaxe de l'UUID.

Showing with 1 addition and 2 deletions
+1 -2
...@@ -9,7 +9,6 @@ namespace Irstea\FileUploadBundle\Form\DataTranformer; ...@@ -9,7 +9,6 @@ namespace Irstea\FileUploadBundle\Form\DataTranformer;
use Irstea\FileUploadBundle\Entity\UploadedFile; use Irstea\FileUploadBundle\Entity\UploadedFile;
use Irstea\FileUploadBundle\Service\FileManagerInterface; use Irstea\FileUploadBundle\Service\FileManagerInterface;
use Rhumsaa\Uuid\Uuid;
use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\DataTransformerInterface;
use Symfony\Component\Form\Exception\TransformationFailedException; use Symfony\Component\Form\Exception\TransformationFailedException;
...@@ -113,7 +112,7 @@ class UploadedFileTransformer implements DataTransformerInterface ...@@ -113,7 +112,7 @@ class UploadedFileTransformer implements DataTransformerInterface
*/ */
protected function reverseTransformFile($value) protected function reverseTransformFile($value)
{ {
if(is_string($value) && Uuid::isValid($value)) { if(is_string($value)) {
$value = $this->fileManager->get($value); $value = $this->fileManager->get($value);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment