Skip to content

Commit

Permalink
Fix JS to accept files also on drag&drop
Browse files Browse the repository at this point in the history
  • Loading branch information
luciajanikova committed Oct 19, 2024
1 parent d021934 commit f803718
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/javascript/controllers/dropzone_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export default class extends Controller {
}

handleFiles(files) {
fileList.innerHTML = '';
const fileInput = document.getElementById('content[]');
fileInput.files = files;

for (const file of files) {
const listItem = document.createElement('div');
Expand Down

0 comments on commit f803718

Please sign in to comment.