Hey everyone,
I just need to sample expert opinions as am building an application that requires user to upload large files (max. 50MB).
Which is better, either to upload the file directly to the server when the form is submitted or i asynchronously upload the file through Ajax to the server, wait for success response and then submit the form.
Am uploading the file straight to AWS S3.
Actually this is more the question of presentation to the user. When you use AJAX and for simplification a upload library that does some percentage processing etc. for you, you should go with AJAX since the user is not only seeing a loading symbol in the tab of his browser but can be guided by a status box/modal or something or a percentage element/progressbar.
@fideloper Yes, I am uploading directly from upload tmp folder straight to S3.
Would go the AJAX way and also take note of setting the max_input_time in php.ini as @bashy recommended.
@fideloper Unless the POST action is directly to another server (AWS), it will still require those settings for the initial upload to the website site server?