Skip to content

Commit

Permalink
Merge pull request #632 from bolt/hotfix/upload-images
Browse files Browse the repository at this point in the history
Fix upload fields, token was broken
  • Loading branch information
bobdenotter authored Sep 17, 2019
2 parents 9f42aca + da4a5cc commit 47a2fe9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/js/app/editor/Components/Image.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export default {
return this.name + '[]';
},
token() {
return this.csrf_token;
return this.csrfToken;
},
},
mounted() {
Expand Down
2 changes: 1 addition & 1 deletion templates/_partials/fields/image.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
:media='{{ field.get('media')|json_encode }}'
:directory='{{ directory|json_encode }}'
:filelist='{{ filelist|json_encode }}'
:csrf_token='{{ csrf_token('upload')|json_encode }}'
:csrf-token='{{ csrf_token('upload')|json_encode }}'
:labels='{{ labels }}'
></editor-image>

Expand Down
2 changes: 1 addition & 1 deletion templates/finder/_uploader.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="card-header">{{ 'caption.file_uploader'|trans }}</div>

<form class="dropzone editor__image--dropzone"
action="{{ path('bolt_async_upload', {'location': location, 'path': path}) }}"
action="{{ path('bolt_async_upload', {'location': location.key, 'path': path}) }}"
method="POST">
{{ macro.icon('upload') }}
<input type="hidden" name="_csrf_token" value="{{ csrf_token('upload') }}">
Expand Down

0 comments on commit 47a2fe9

Please sign in to comment.