Skip to content

Commit

Permalink
fixed form action (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
Silas Joisten authored Apr 1, 2019
1 parent 4cd48e8 commit bde4c03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Controller/MultiUploadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/views/multi_upload.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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 }},
Expand Down

0 comments on commit bde4c03

Please sign in to comment.