diff --git a/src/Controller/MultiUploadController.php b/src/Controller/MultiUploadController.php index e907dc6..c0f98b8 100644 --- a/src/Controller/MultiUploadController.php +++ b/src/Controller/MultiUploadController.php @@ -84,6 +84,7 @@ private function createMultiUploadForm(MediaProviderInterface $provider, string { return $this->createForm(MultiUploadType::class, null, [ 'data_class' => $this->mediaManager->getClass(), + 'action' => $this->admin->generateUrl('multi_upload', ['provider' => $provider->getName()]), 'provider' => $provider->getName(), 'context' => $context, ]); diff --git a/src/Resources/views/multi_upload.html.twig b/src/Resources/views/multi_upload.html.twig index 720a46b..4dcc159 100644 --- a/src/Resources/views/multi_upload.html.twig +++ b/src/Resources/views/multi_upload.html.twig @@ -44,7 +44,7 @@ let cancelRedirect = false; let uploadedMediaIds = []; $('div.{{ form.vars.id }}').dmUploader({ - url: '{{ form.vars.action }}', + url: '{{ form.vars.action|raw }}', maxFileSize: {{ maxUploadFilesize }}, {% if provider.allowedExtensions is defined %} extFilter: {{ provider.allowedExtensions|json_encode|raw }},