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 年前檢視次數 266 次
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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南