amazon-s3-php-class icon indicating copy to clipboard operation
amazon-s3-php-class copied to clipboard

Bulk upload files/folders

Open kujain opened this issue 9 years ago • 1 comments

Thanks for such a well-written and robust S3 class! I just had one issue: is there any way to copy a folder (recursively) to S3 from local? Individual files can use S3::putObjectFile to upload to S3, but I cannot see any way to modify this to work with a folder name. I also tried using S3::putObjectString() which allowed me to copy a folder name, but it doesn't copy any contents of that folder.

Basically I want to copy an entire folder with its contents to S3. Hope there's a simple way for this?

Thanks!

kujain avatar Mar 23 '16 18:03 kujain

Figure I will answer this since I already did this...

Basically read the contents of the folder you want to upload files form. If you have the filenames in an array, you just loop through putting each one.

zerofill avatar Aug 17 '17 02:08 zerofill