2013-11-26 4 views
1

Plupload를 사용하여 Amazon S3에 이미지를 업로드하고 업로드에 메타 데이터를 포함하고 싶습니다. I는 다음과 같이 plupload 보내메타 데이터로 s3에 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' 
        ), 
       ); 

이 파일을 업로드하지만, 메타 데이터가 연결되어 있지 않습니다. 나 자신의 요소 및 multipart 매개 변수로 배열에 추가했지만 아무 일도 시도했다.

누군가 나를 도울 수 있습니까?

답변

0

정책에 사용자 지정 메타 데이터에 대한 조건이 있어야합니다.

array('starts-with', 'x-amz-meta-author', '')

또한 내가 대신 헤더의 추가 multipart_params로 사용자 정의 메타 데이터를 전달하고있다. 중요한지 확실하지 않습니다.

관련 문제