How can I presign a StatObjectUrl
fissssssh opened this issue · 1 comments
fissssssh commented
I didn't find an API like PresignedStatObject
in the API, but there is PresignedHeadObject in the Go SDK.
Currently, this is the only way I can do it,
var args = new PresignedGetObjectArgs().WithBucket(bucket).WithObject(object).WithExpiry(expiry);
var fieldInfo = typeof(PresignedGetObjectArgs).GetProperty("RequestMethod", BindingFlags.NonPublic | BindingFlags.Instance);
fieldInfo?.SetValue(args, HttpMethod.Head);
return _client.PresignedGetObjectAsync(args); // This URL is the one I'm looking for.
but I feel it's not native.
martijn00 commented
Can you open a PR to add this?