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

已提问 2 年前261 查看次数
1 回答
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
已回答 8 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则