How can i get more than 1000 parts of amazon s3 multipart upload using php-aws lib listParts() method. -


I use this code, and it did not return more than 1000 parts of the upload. How do I get more than 1000 parts of the Amazon S3 multipart upload using the Php-aws lib listParts () method? Thank you.

  $ parts = $ s3- & gt; List pars (array ('bucket' => gt; bucket, 'key' = & gt; $ keyName, 'UploadId' = & gt; $ upload id,));    

If there are more than 1000 parts, then result in NextPartNumberMarker Area. Assume with NextPartNumberMarker and make another request exactly like your original, but add the parameter with the value from PartNumberMarker to NextPartNumberMarker , like this From: ($ "bucket" => $ bucket, 'key' = & gt; $ keyName, 'UploadId' = & gt; $ upload id, '$' partnumber marker = '1 & gt; result 1 [' Next point number marker '],));

These parameters are documents.

It is a pain to do this, however, so the easiest way to use SDK is to calculate a portion of the Iterators at one time, and automatically request later in the background for more as necessary. Are there. To use an iterator for the list ports operation, you can do something like this:

  $ parts = $ s3- & gt; GetIterator ('ListParts', array ('bucket' = & gt; $ bucket), 'key' = & gt; $ keyName, 'UploadId' = & gt; $ upload id,)); ($ Part as part $) {// Part data print ("% d:% s (% d bytes)" \ n ", $ part ['partner'], $ part ['etg'] , $ Portion ['size']); }    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -