Skip to content

Commit 047b160

Browse files
author
Dmitry Pchelintsev
committed
Added the ability to pass the Protocol property to the PresignedRequest
1 parent 3564d06 commit 047b160

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

FluentStorage.AWS/Blobs/AwsS3BlobStorage.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,15 @@ public async Task<string> GetDownloadUrlAsync(string fullPath, string mimeType,
325325
/// <summary>
326326
/// Get presigned url for requested operation with Blob Storage.
327327
/// </summary>
328-
public async Task<string> GetPresignedUrlAsync(string fullPath, string mimeType, int expiresInSeconds, HttpVerb verb) {
328+
public async Task<string> GetPresignedUrlAsync(string fullPath, string mimeType, int expiresInSeconds, HttpVerb verb, Protocol protocol = default) {
329329
IAmazonS3 client = await GetClientAsync().ConfigureAwait(false);
330330

331331
return client.GetPreSignedURL(new GetPreSignedUrlRequest() {
332332
BucketName = _bucketName,
333333
ContentType = mimeType,
334334
Expires = DateTime.UtcNow.AddSeconds(expiresInSeconds),
335335
Key = StoragePath.Normalize(fullPath, true),
336+
Protocol = protocol,
336337
Verb = verb,
337338
});
338339
}

FluentStorage.AWS/Blobs/IAwsS3BlobStorage.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public interface IAwsS3BlobStorage : IBlobStorage {
3030
/// <summary>
3131
/// Get presigned url for requested operation with Blob Storage.
3232
/// </summary>
33-
Task<string> GetPresignedUrlAsync(string fullPath, string mimeType, int expiresInSeconds, HttpVerb verb);
33+
Task<string> GetPresignedUrlAsync(string fullPath, string mimeType, int expiresInSeconds, HttpVerb verb, Protocol protocol = default);
3434

3535
/// <summary>
3636
/// Set acl for object.

0 commit comments

Comments
 (0)