mercredi 2 septembre 2015

How to read a part of amazon s3 key, assuming that "multipart upload complete" is yet to happen for that key?

I'm working with Amazon S3 multipart uploading and I am facing following issue. Basically I am uploading a file chunk by chunk to s3, And during the time if any write happens to the file locally, I would like to reflect that change to the s3 object which is in current upload process. Here is the procedure that I am following,

  1. Initiate multipart upload operation.
  2. upload the parts one by one [5 mb chunk size.] [do not complete that operation yet.]
  3. During the time if a write goes to that file, [assuming i have the details for the write [offset, no_bytes_written] ].
  4. I will calculate the part no for that write happen locally, And read that chunk from the s3 uploaded object.
  5. Read the same chunk from the local file and write to read part from s3.
  6. Upload the same part to s3 object.
  7. This will be an a-sync operation. I will complete the multipart operation at the end.

I am facing an issue in reading the uploaded part that is in multipart uploading process. Is there any API available for the same?

Any help would be greatly appreciated.




Aucun commentaire:

Enregistrer un commentaire