[ ]
, , , URL-. (.. ), :
string bucketName = "foo.example.com";
GetPreSignedUrlRequest request = new GetPreSignedUrlRequest()
.WithBucketName(bucketName)
.WithKey(key)
.WithExpires(DateTime.Now.AddMinutes(32))
.WithProtocol(Protocol.HTTP);
URL- , .. http://foo.example.com.foo.example.com/myfile.txt?[...]
, :
string url = s3Client.GetPreSignedURL(request);
url = url.Replace(bucketName + "." + bucketName, bucketName);
URL (.. http://foo.example.com/myfile.txt?[...]), , .
URL-, , , , , . Query String Request Authentication Alternative, , :
StringToSign = HTTP-VERB + "\n" +
Content-MD5 + "\n" +
Content-Type + "\n" +
Expires + "\n" +
CanonicalizedAmzHeaders +
CanonicalizedResource;
, ; section .
, AWS SDK .NET, ., , S3 , , "+" ? , , ; , , , AWS / , .
!
[dysfunctional]
SAME CNAME bucket , , , GetPreSignedUrlRequest, :
GetPreSignedUrlRequest request = new GetPreSignedUrlRequest()
.WithKey(key)
.WithExpires(DateTime.Now.AddMinutes(5))
.WithProtocol(Protocol.HTTP);
, , .