Skip to content

Instantly share code, notes, and snippets.

@awswithdotnet
Last active April 3, 2022 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awswithdotnet/7ab09e9d9a43ef16426d58242a7df4ad to your computer and use it in GitHub Desktop.
Save awswithdotnet/7ab09e9d9a43ef16426d58242a7df4ad to your computer and use it in GitHub Desktop.
S3 Presigned Api UploadController Partial 2
string bucketName = "";
string key = Guid.NewGuid().ToString() + ".txt";
RegionEndpoint bucketRegion = RegionEndpoint.USEast1;
var client = new AmazonS3Client(bucketRegion);
var putRequest = new PutObjectRequest
{
BucketName = bucketName,
Key = key,
ContentBody = createSignedUrlRequest.Content
};
PutObjectResponse putObjectResponse = await client.PutObjectAsync(putRequest);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment