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년 전265회 조회
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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인