Search the Community
Showing results for tags 'large uploads'.
-
I built a "bulk importer" that takes a .zip file filled with images and a corresponding csv file that holds attributes. I'm happily using some JavaScript to provide upload-progress feedback to the user. So if the .zip file is say 10mb... they are seeing it's upload progress. (im using AJAX) This is all working nicely BUT... Once the .zip hits the server I need to do A TON of processing. Each image has to be converted into 10 different sizes, cropped, etc... All entries must be entered into the Database and admin text logs created. All of this actually works just fine for small files <10mb and I'm sure it could work with bigger files by increasing timeout time,etc... BUT the browser "locks up" during processing and there is no real way to inform the user about the progress of their files being processed. I thought maybe I could be clever and create a "progress table" in the db... and use it like this: As soon as the .zip file is uploaded to the server I create a row and an id. Next I send that id back to the browser (AJAX) and immediately start the laborious processing. The processing would continually update the DB with it's progress. The js would receive the id and keep polling the DB to check on the processing progress and ultimately report this back to the user. Well my brilliant scheme doesn't seem to work and everything locks up regardless. I think I was trying to fake multi-threading and I'm not sure how to solve this problem. My end goal is to crunch huge files and keep the user notified of it's progress - Does anyone have good advice?