简体   繁体   中英

Upload files directly to AWS S3 storage using browser rather via asp.net app

We need to work on asp.net application which will allow upload/download of files to AWS S3 storage bucket.

All contents stored in bucket are non-public.

We figured files can be downloaded directly from AWS S3 storage using pre-signed urls .

We are also trying to figure out a way by which we can upload files also directly to AWS S3 storage bucket.

After looking for sometime we found below article but this article is quite old and i am not able to figure out how actually it works or its latest version.

Is there a better way of uploading files directly from client browser.

Pointer to asp.net code snipped or article would be nice start

You could authenticate your users with cognito , either with a login provider or with your own identities .

Then, your client browser can use GetCredentialsForIdentity to retrieve temporary AWS credentials associated with a role that you configure to have permissions to write in S3 .

Use the AWS javascript SDK to communicate with the S3 API.

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