javascript - Check files in FormData -
this question has answer here:
- get file size before uploading 12 answers
- validation of file extension before uploading file 15 answers
- how check file mime type javascript before upload? 7 answers
- how can data formdata in javascript? 1 answer
i have form upload files. passing files use formdata:
var data = new formdata($("#sendinvoiceform")[0]);
than pass ajax :
$.ajax({ url: sjsurlsaveinvoicelogo, type: "post", data: data, processdata: false, contenttype: false, success: function (data) { }, error: function (jqxhr, textstatus, errorthrown) { //if fails } });
how can check files .img , size not larger 5000 kb?
Comments
Post a Comment