blueimp/jQuery-File-Upload

File size limitation not work on IOS

YswNG opened this issue · 3 comments

YswNG commented

Hi ,

I met a issue , I set maxFileSize to limit file size, it works when I use Chrome on PC , but it does not work when I use my phone to visit web site, I do not know why , is it a issue ? or could you tell me how to handle this ?

thanks

YswNG commented

oh, I forgot that I also use Chrome on my phone

Hi @YswNG, if you set it via https://github.com/blueimp/jQuery-File-Upload/wiki/Options#maxfilesize option, it should work as expected, including on iOS.
There is even a unit test for it:

it('maxFileSize', function (done) {
var processData;
form.fileupload({
maxFileSize: 200,
singleFileUploads: false,
processalways: function (e, data) {
processData = data;
},
processstop: function () {
expect(processData.files[0].error).to.equal();
expect(processData.files[1].error).to.equal(
form.fileupload('option').i18n('maxFileSize')
);
done();
}
});
form.fileupload('add', { files: files });
});

(side note: Chrome on iOS is just Safari with a different UI)

Closing this for now, please post further information if you can provide a reproducible test case.