0

How to work with input[type="file"]?

I want give in the audio link from input[file]. How it make? Можете на русском объяснить)

6th Jan 2021, 4:47 PM
Almas
Almas - avatar
1 Answer
+ 1
You want to make a file selector for uploading audio files like mp3, right? Here is how you could write the tag: <input type="file" name="audiofile" accept="audio/*"> When you click choose file, only audio files should appear. It is described in detail at: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file If you haven't made a file upload form before, make sure your form element has method="post" and enctype="multipart/form-data". Files can't be encoded like a typical form parameter.
6th Jan 2021, 7:47 PM
Josh Greig
Josh Greig - avatar