Amazon s3 使用元数据将plupload添加到s3

Amazon s3 使用元数据将plupload添加到s3,amazon-s3,metadata,plupload,Amazon S3,Metadata,Plupload,我正在使用Plupload将图像上传到AmazonS3,我希望在上传中包含元数据 我发送给plupload的配置如下所示: $plupload_init = array( 'runtimes' => 'html5,silverlight,flash,html4', 'browse_button' => 'test_plupload-browse-button',

我正在使用Plupload将图像上传到AmazonS3,我希望在上传中包含元数据

我发送给plupload的配置如下所示:

$plupload_init = array(
                    'runtimes'            => 'html5,silverlight,flash,html4',
                    'browse_button'       => 'test_plupload-browse-button',
                    'container'           => 'testpluploadContainer',
                    'drop_element'        => 'test_drag-drop-area',
                    'file_data_name'      => 'file', 
                    'multiple_queues'     => false,
                    'max_file_size'       => '200mb',
                    'url'                 => 'http://myBucket.s3.amazonaws.com/',
                    'flash_swf_url'       => includes_url('js/plupload/plupload.flash.swf'),
                    'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'),
                    'filters'             => array(array('title' => __('Allowed Files'), 'extensions' => '*')),
                    'multipart'           => true,
                    'multipart_params'    => array(
                          // 'key' => '${filename}', // add folder later
                          'Filename' => '${filename}', 
                          'acl' => 'public-read',
                          'Content-Type' => '',
                          'success_action_status' => '201',
                          'AWSAccessKeyId' => $accessKeyId,
                          'policy' => $policy,
                          'signature' => $signature,
                    ),
                    'headers' => array(
                        'x-amz-meta-author' => 'test'
                    ),
                  );
这会上载文件,但没有附加元数据。我尝试将其作为自己的元素添加到数组中,并添加到多部分参数中,但没有任何效果


有人能帮我吗?

您的策略必须对自定义元数据设置条件

数组'starts-with','x-amz-meta-author'

此外,我还将自定义元数据作为附加的多部分参数而不是标头传递。不知道这是否重要