简体   繁体   中英

Multi Object Upload to Amazon S3 not from directory in C#

I am aware of the TransferUtitlity class from the SDK but it would appear that only supports uploading large files from stream or multiple files via a hard disk. Is there a way to use TransferUtility or another set of the AWSSDK functions to upload/put multiple objects (in the form of 'strings') to S3 using the built-in optimizations of the TransferUtility class?

To give an example, say I have 1000 string "contents" in an array and would like each of those to become an object in s3 with their own key. What is the more efficient way to upload these objects as a group?

After further researching this issue and playing around with a variety of approaches, the quickest way to upload a bunch of (non huge) files to s3 was to use the TPL and parallel.foreach for each of the files to be uploaded. This resulted in the quickest upload time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM