如何通过POST将文件上传到Amazon S3存储桶子文件夹? [英] How to upload files to a Amazon S3 bucket subfolder via POST?

查看:381
本文介绍了如何通过POST将文件上传到Amazon S3存储桶子文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用plupload 1.4.2将文件直接上传到Amazon S3存储桶.问题是,如何将它们直接上传到子文件夹?我应该在策略或plupload对象配置中配置哪些参数?

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没有文件夹"或子文件夹"的概念.仅对象.一个对象有一个键".

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";

然后Amazon S3将创建虚构"文件夹和子文件夹.

And Amazon S3 will create the "imaginary" folder and subfolder.

这篇关于如何通过POST将文件上传到Amazon S3存储桶子文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆