【发布时间】:2014-06-02 21:34:41
【问题描述】:
我已经用 php 上传到 amazon s3,但我不想只上传到存储桶的根目录。我想将文件保存在子目录中。 如何将文件保存到存储桶的子目录? 我试过这个:
multipart_params: {
<?
'key': '/imagegallery/${filename}', // use filename as a key
'Filename': '/imagegallery/${filename}', // adding this to keep consistency across the runtimes
'acl': 'public-read',
'success_action_status': '201',
'Content-Type': 'image/jpeg',
'AWSAccessKeyId' : '<?php echo $accessKeyId; ?>',
'policy': '<?php echo $policy; ?>',
'signature': '<?php echo $signature; ?>'
},
那没用。它只是将文件放在存储桶的根目录中。我需要将目录添加到策略文件吗?
【问题讨论】: