Answer the question
In order to leave comments, you need to log in
FileList does not see a file from a field of type file. What to do?
JS:
document.getElementById('create_company_btn').addEventListener("click", function() {
const FileInput = document.getElementById("id_photo");
console.log(FileInput.files);
}, false);
HTML:
, or rather it outputs FileInput.
And when you click on create_company_btn, an empty FileList array is written to the console.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question