I'm working with the S3 .net client and I'm perfectly able to get a presigned url (I followed this tutorial online). I would like to let the user to store their files in a specific path only (for example into the 'testtest/' folder).
As explained also here in another StackFlow thread, is possible to use:
Conditions=[["starts-with", "$key", "uploads/"]]
I'm using the .net S3 client and actually seems that there is no way to set this condition. Do you have an idea how to set "starts-with" option?
I tried to use the "parameters" as show in the following lines without success.
< !--language - all: cs-- >
GetPreSignedUrlRequest request1 = new GetPreSignedUrlRequest
{
BucketName = _BucketName,
Key = key,
Expires = expiryTime,
Verb = HttpVerb.PUT
};
request1.Parameters.Add("Conditions", "[\"starts-with\", \"testtest/\"]"); // <== THIS LINE