hyper icon indicating copy to clipboard operation
hyper copied to clipboard

feat(connect): `storage.upload` and `storage.download` should attempt to use signed urls, if possible

Open TillaTheHun0 opened this issue 2 years ago • 0 comments

As an engineer maintaining the hyper cloud platform, I would the like the hyper-connect SDK to use the signedUrl flow for storage.upload and storage.download, whenever possible so that load can be distributed off of the hyper service and instead be placed directly on wrapped services.

Background

Files can be uploaded and downloaded directly using hyper OSS and hyper cloud. file serving can be considerable load on the system, especially with large files being uploaded or downloaded. Hyper Storage adapters may implement the useSignedUrl flow for both getObject and putObject, which returns a presigned url that the consumer can then interact with, directly. hyper-connect being a consumer, we would like it to use this signedUrl flow whenever possible, to reduce load put onto the actual hyper system, as is one of the use cases for the signedUrl flow.

for upload and download hyper-connect should attempt to first obtain a presigned url from hyper, for each flow, respectively. If hyper-connect is not able to obtain a presigned url ie. the adapter doesn't support presigned url flow (probably should be a status code for this) ie. a local-only adapter, then hyper-connect should transparently fallback to using the regular upload and download directly through hyper.

TillaTheHun0 avatar Aug 30 '22 19:08 TillaTheHun0