Usually we used relay on Flash for file upload, where has we can use the HTML5 for that
Example i want to select only doc/pdf/image file for uploading it was really a painful job in javascript
Where as we can use the HTML COntrol to do the job for us. but also a javascript validation is required.
For Image สำหรับรูปภาพ
1
2
3
|
<input type="file" accept="image/gif,image/png,image/bmp,image/jpg"> or <input type="file" accept="image/*"> |
For Audio/Video สำหรับวีดีโอ
1
|
<input accept="audio/*|video/*|image/*|MIME_type" /> |
For PDF สำหรับไฟล์ PDF
1
|
<input type="file" accept="application/pdf"> |
For Zip file สำหรับไฟล์ Zip
1
|
<input type="file" accept="application/zip"> |
For Word (doc/docx) สำหรับไฟล์ word
1
|
<input type="file" accept="application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"> |