night_driver's avatar

[DISCUSSION] Implement massive upload images features

Hello everyone,

I was wondering what is the best way to implement masssive upload images ?

For exemple, user need to be able to upload like 500 images with high resolution (let's say 20 Mo/image for exemple) and then you need to store it on a S3.

Here the possibilities i found :

  1. Traditional way and increase the post_max_size / upload_max_filesize php config but still it will take too much time and result to timeout in the some cases and not optimal
  2. Signed Url : User only upload meta-data of the 500 images and the app generate 500 signed URL that we gonna use to upload on the front-end (javascript) . Quiet good option but if the user has an issue with the S3 signed url the app is "blind" and not seems to have good tracability for errors.

If you were to implement this feature, what would you do?

Thank you ! Cheers !

0 likes
4 replies
jlrdw's avatar

Upload in chunks. Plenty of previous discussions on this.

2 likes
night_driver's avatar

@jlrdw Hello,

Thank you for your answer.

Yes i saw upload in chunks but i thought it was more relatated for a single big file not for many like this.

So you recommend to upload all the chunks :

  • On the web server and then combine all the images and send to S3 OR
  • Directly upload the chunks on S3 and then combine and store the final images on S3

What is the best way do you think ?

Thank you very much !

night_driver's avatar

@Snapey Hello,

Thank you very much for your answer.

What i understood is that this working perfectly for only one big file but for like 500 files i need to generate 500 signed url for each file. Is that correct?

If the case do you think it is viable solution ?

Thank you !

Please or to participate in this conversation.