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年前267ビュー
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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ