How can i upload 50 MB file to s3 from edge device in multiple of 1 MB chunked size?

0

Hi,

I want to upload 50 MB file to AWS S3 from embedded device.

I want to chunk file in multiple of 1 MB and send 50 such PUT request for same object. (Providing range in HTTP header) Let me know the HTTP header field i have to set for this.

Is there any example available in C language for same?

Currently i could send PUT request to S3 and upload 1 MB data. But on subsequent request data is overwriting in same file instead of appending it.

Let me know if you want more information.

Thanks in advance, Darshak

asked 2 years ago247 views
1 Answer
0

To achieve a 50MB upload in multiple 1 MB chunks you can use the AWS SDK which is compatible with C language. Within the SDK you can do multipart upload. Here are some steps: Initialize the AWS SDK

  1. Initialize the AWS SDK
  2. Create an S3 client
  3. Start a multipart upload by sending a “ CreateMultipartUploadRequest”
  4. Upload each chunk as a part using “ UploadPartRequest”
  5. Complete the multipart upload by sending a “completeMultipartUploadRequest” Here is a link with more instructions to assist you. Hope this Helps! https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpu-upload-object.html
Tosin_A
answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions