how to generate shared link after uploading file with rest API in asp Core.

0

in AWS, there's one option to generate a pre-signed URL for the object specified. Enter image description here I want a shared URL for the object I'm uploading through the rest API. Is that possible to get a shared link through rest API, If yes, What could be the possible solution? I don't want to add AWS S3 SDK dependency. Framework: ASP dot net core. language: C#

已提問 1 年前檢視次數 472 次
1 個回答
2
已接受的答案

Yes, it is possible to generate a pre-signed URL for an object in AWS S3 through the REST API without adding the AWS S3 SDK as a dependency. One way to do this would be to use the AWS S3 REST API's "PutObject" or "GetObject" endpoint, along with the "X-Amz-Signature" header to sign the request using your AWS S3 access key and secret key. Once you have the pre-signed URL, you can share it with others to give them temporary access to the object. An example of how to generate a pre-signed URL using the AWS S3 REST API in C# without the AWS S3 SDK can be found in the AWS documentation. https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html

profile picture
已回答 1 年前
profile picture
專家
iwasa
已審閱 1 年前

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

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

回答問題指南