diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/markdown/s3.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/markdown/s3.md b/doc/markdown/s3.md index 75a9954..086718e 100644 --- a/doc/markdown/s3.md +++ b/doc/markdown/s3.md @@ -74,6 +74,52 @@ These examples assume you have an account (GlusterFS volume) named `test` and an ```sh ./s3curl.pl --id 'test:tester' --key 'testing' --del -- -k -v -s http://localhost:8080/bucket1 ``` +**Multi-part upload an object to the bucket** + + ***a. Initiate multi part*** +```sh +./s3curl.pl --id 'test:tester' --key 'testing' --post -- "http://localhost:8080/bucket/mobject?uploads" +``` + +***b.upload the multi parts*** +upload all the parts by changing partNumber. get the uploadId from the output of Initiate multipart +```sh +./s3curl.pl --id 'test:tester' --key 'testing' --put xaa -s 'http://localhost:8080/bucket/mobject?uploadId=<uploaIdFromPreviousStep>&partNumber=<partNumber>' +``` + +***c.complete the multi part*** + + ****c.1 List the part numbers and Etags**** +```sh +./s3curl.pl --id 'test:tester' --key 'testing' -- "http://localhost:8080/bucket/mobject?uploadId=<uploadId>" +``` + ****c.2 make a xml file with following format and do a POST request**** + + example: cat ./complete_multi_tag +```xml. +<CompleteMultipartUpload> + <Part> + <PartNumber>1</PartNumber> + <ETag>"9dff188990a9831c5255d342895832df"</ETag> + </Part> + <Part> + <PartNumber>2</PartNumber> + <ETag>"72e117e4266579616ad295f399ae10a3"</ETag> + </Part> + <Part> + <PartNumber>3</PartNumber> + <ETag>"85c6e4487367f279926ad5da495a1d20"</ETag> + </Part> +</CompleteMultipartUpload> +``` +```sh +./s3curl.pl --id 'test:tester' --key 'testing' --post ./complete_multi_tag -- http://localhost:8080/bucket/mobject?uploadId=<uploadId> +``` + +***d.download the multi part object*** +```sh +./s3curl.pl --id 'test:tester' --key 'testing' -- "http://localhost:8080/bucket/mobject" > output_file +``` **Using boto module in python to access GlusterFS cluster over S3 API** ```python |