I'm trying to validate max file size of 5MB, and it works on PC, on android phones, but fails everytime i use an iPhone. If i try to upload a photo of 6MB from a iPhone, it passes the validation but fails later because of my <jsonSerialization maxJsonLength="5000000"></jsonSerialization>
restriction, and returns "Message": "Maximum request length exceeded." as expected.
So i added these lines on my $('input[type=file]').change(function):
var tam = $(this).get(0).files[0].size;
tam = tam / 1024;
alert('File size with division:' + tam);
And i get the alert saying that the 6MB photo in question has less than 4MB (3425kb), the code continues and then i get Maximum request length exceeded error.
I'm using:
Like i said, i'm only getting this error on iPhones.
Thanks in advance