Replace qualifier with import
This commit is contained in:
parent
e679d02b41
commit
602eeb49eb
@ -7,6 +7,7 @@ use App\Entity\User;
|
|||||||
use App\Repository\UserRepository;
|
use App\Repository\UserRepository;
|
||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
|
use Exception;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||||
@ -59,7 +60,7 @@ class UploadController extends AbstractController
|
|||||||
$fileUrl = $this->generateFileUrl($newFilename);
|
$fileUrl = $this->generateFileUrl($newFilename);
|
||||||
|
|
||||||
return new Response($fileUrl, Response::HTTP_CREATED);
|
return new Response($fileUrl, Response::HTTP_CREATED);
|
||||||
} catch (\Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
return new JsonResponse(['error' => $exception->getMessage()], Response::HTTP_BAD_REQUEST);
|
return new JsonResponse(['error' => $exception->getMessage()], Response::HTTP_BAD_REQUEST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user