I currently am facing an obstacle when uploading files to netlify. Not only are my inputs not registering, but only one file will upload. When selecting multiple files none will upload. Below is my code:
UPLOAD THE CONTENT IN QUESTION TO GET POSTED
Blur my face
<label for="file">Choose a file:</label><br>
<input type="file" name="music" multiple="multiple"/><br><br>
<input type="submit" value="SUBMIT">
As per the
File Uploads documentation
Only one file upload per field is supported. For multiple file uploads, use multiple fields.
I don’t understand. Isn’t every input a field? That would mean I have multiple fields no?
multiple files in a single field. You need multiple fields each handling a single file.
Three separate file fields each with a single file
<input type="file" name="file1">
<input type="file" name="file2">
<input type="file" name="file3">
one file field allowing more than one file.
<input type="file" name="files" multiple>
Ok. I replaced the prior code with what you suggested, and it didn’t register. None of the files submitted
It wasn’t intended for verbatim copy/paste, rather a demonstration.
If you can share the page the form is on, and the repository you are deploying from, I can possible offer more pertinent assistance.
HTML isn’t code.
Ok. I deploy from Netlify alone.
Using the form from the
Netlify Documentation I added a form field
<form name="fileForm" enctype="multipart/form-data" data-netlify="true">
<input name="name" type="text"/>
<input name="file1" type="file"/>
<input name="file2" type="file"/>
And see both images are submitted:
This truly worked. I want to thank you for your patience with me, and expertise.