Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
const51906yAs I know there's no limitation on uploading a file through ajax request, if there was you won't be able to done with Firefox as you mentioned. Maybe it's a browser issue.
PS: you can set limitation in ajax request. -
devTea219106y@const last time I checked it is set on backend web config with http request size. Since this is a browser problem should I stick to classic form submission or find another way with ajax? (Does splitting the string into arrays help?)
-
devTea219106y@dontbeevil only tried on firefox and it worked, the I thought this is probably chrome problem. Is there no one posting data with ajax nowadays?
-
const51906y@devTea classic form submission for large file is not good idea in my opinion, as @dontbeevil said try with different browsers like opera, edge or Vivaldi or even chromium.
I use Ajax to post data depending upon project. -
Forside14596ySplitting should work, but needs some modification to backend as it needs to build the full string upon multiple requests.
-
devTea219106y@const then how does those cloud storage file upload works? How you handle large file upload on your project?
@Forside yeah it was during a pas project I’m just curious what I should do if I face another one like this -
const51906y@devTea unfortunately I still not done a project yet dealing with large upload and download. But I believe they use RestAPI to transfer data, they store data in chunk of file or as single file depending upon server code. And large data transmission over ajax is not an issue.
I'll give time on this seems interesting to me. -
Minion4446yTry to look into multipart/form-data upload, AWS is doing so:
https://docs.aws.amazon.com/AmazonS... -
devTea219106y@theKarlisK I’ve read that it’s a bug since long time ago, how you deal with large uploads?
-
@devTea used File object as argument to XMLHttpRequest.send(file) to send single file. And upload event to determine upload percent, that's all.
-
devTea219106y@Pogromist ok will try that if I have time (sorry if this is obvious but did you turn it into base64 and send it in string format?)
Related Rants
So lately I’ve been sending an http request with ajax instead of using classic form submit. Pdf and images need to be converted into byte64 string then send it to the backend, problem is if the size gets too big chrome crashes and showed me ‘Aw snap’, but it works on firefox. Thr file is size could be 3 to 100 mb (for pdf). So my question; is this my problem or just browser limitation?
question
ajax
chrome
http request