简体   繁体   中英

How to upload files to a Amazon S3 bucket subfolder via POST?

I'm using plupload 1.4.2 to upload files directly to an Amazon S3 bucket. The question is, how can I upload them to a subfolder directly? What parameters should I configure in the policy or plupload object config?

Amazon S3 there is no concept of folder or subfolder. Only objects. And an object has a key.

If you wanna upload a file to a folder or subfolder, simply put the object key like this:

$key = "folder/subfolder/filename.extension";

And Amazon S3 will create the (imaginary) folder(s) and subfolder(s).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM