Skip to content

Commit

Permalink
Fix file upload in image dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Usbac committed Jun 23, 2024
1 parent 119bfcd commit a724577
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions public/assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ class ImageDialog {

this.#dialog_el.innerHTML = LOADING_ICON;
let data = new FormData();
data.append('csrf', csrf_token);
Array.from(event.dataTransfer.files).map(file => data.append('file[]', file));

fetch('/admin/media/upload?path=' + this.#current_path, {
Expand Down

0 comments on commit a724577

Please sign in to comment.