Open avirshup opened 4 years ago
This would be a great addition. I would suggest to for now use the extension method naming convention to introduce these methods to select storage drivers (e.g. ex_get_presigned_upload_url
) and if the functionality gets implemented more widely we can promote the new methods to the core API. To validate the Azure Blobs functionality, I would suggest to also add some integration tests here.
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue.
Proposal -
This is a follow-up to @rvolykh's proposal in #1403 -
The "read" version of this functionality was implemented AWS S3 in #1453 and for Azure Blobs in #1408 via the
StorageDriver.get_object_cdn_url
method.Here I'm proposing the "write" version - a method that generates a pre-authorized, time-limited URL that allows upload of a given object. I think the implementation would be trivial - just change
"GET"
to"PUT"
here"r"
to"w"
here.I'd be happy to contribute a PR for this. But I'm not sure where the new function would go, though. Would it make sense to add a new abstract method to
StorageDriver
, e.g.,StorageDriver.get_presigned_upload_url(container: str, object_name: str) -> str
?