Reputation: 14048
I need to upload an entire folder of files and subfolders to an Amazon S3 bucket using PHP, does anyone know of a solution to quickly and easily accomplish this? Other libraries I've looked into appear to only support uploading individual files.
Upvotes: 4
Views: 3419
Reputation: 462
s3cmd is fabulous solution !!! but instead using php for uploading of directory use parameter with s3cmd like this: s3cmd put --recursive directory_name s3://bucket_name
in terminal shell....enjoy s3cmd!!
Note: Use this s3cmd link for installation on your platform, for ubuntu lovers just type
Upvotes: 0
Reputation: 536
in amazon s3 folder is barely what you give an url name. virtually it creates folder based on url and why you want to use php whereas you can cli. you can upload multiple files that way i.e for each file you can fire a cli command i.e
s3cmd put source/source1.txt target/target1.txt
Upvotes: 1