public string GetSignedUrl(string bucket, string key, SignedUrlType type, int timeoutInMinutes, S3CannedACL acl = null) { this.Logger.LogDebug($"[{nameof(this.GetSignedUrl)}]"); this.Logger.LogTrace(JsonConvert.SerializeObject(new { bucket, key, type, timeoutInMinutes, acl })); if (string.IsNullOrWhiteSpace(bucket)) { throw new ArgumentNullException(nameof(bucket)); } if (string.IsNullOrWhiteSpace(key)) { throw new ArgumentNullException(nameof(key)); } var request = new Amazon.S3.Model.GetPreSignedUrlRequest { BucketName = bucket, Key = key, Expires = DateTime.UtcNow.AddMinutes(value: timeoutInMinutes), Verb = type == SignedUrlType.Download ? HttpVerb.GET : HttpVerb.PUT, }; this.Logger.LogTrace(JsonConvert.SerializeObject(value: request)); var response = this.Repository.GetPreSignedURL(request: request); this.Logger.LogTrace(JsonConvert.SerializeObject(value: response)); return(response); }
public string GetSignedUrl(string bucket, string key, SignedUrlType type, int timeoutInMinutes, S3CannedACL acl) { return(Text.FilePath); }