php - How to update object properties in a AWS S3 Bucket -


i've uploaded 25k files (large media files) s3 bucket. used aws sdk2 php (s3client::putobject) perform uploads. now, need update metadata these files i.e change contentdisposition attachment , assign filename.

is there way perform without requiring re-upload file? please help.

yes, can use copyobject method, set copysource parameter equal bucket , key parameters.

example:

// setup $s3 connection, , define bucket , key resource. $s3->copyobject(array(   'bucket' => $bucket,   'copysource' => "$bucket/$key",   'key' => $key,   'metadata' => array(     'extraheader' => 'header value'   ),   'metadatadirective' => 'replace' )); 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -