mjrobichaud
mjrobichaud

Reputation: 115

Amazon S3 Multi-Image Upload with PHP and Javascript

Alright.... so after searching for days I am officially stuck. My problem seems pretty simple but every time I think I am on the right track I get stopped.

I have a simple html form that has the option for the user to upload a few pictures. I need to store these using Amazon S3 which doesn't support multi-file upload with POST. Is there ANY way I can workaround this limitation? Maybe a PHP script to upload them sequentially?

Thanks in advance.

Upvotes: 1

Views: 1134

Answers (1)

Savid
Savid

Reputation: 311

I just had a look at the SDK. One of the sample php files shows multiple file uploads (_samples/cli-s3_get_urls_for_uploads.php).

You'll have to;

  • have the user upload their files and store them on your website (temp)
  • add files to a batch send $s3->batch()->create_object();
  • then send them off with $s3->batch()->send();

Upvotes: 1

Related Questions