Storage: Upload to Bucket from Url #22590
Unanswered
psteinroe
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
we have a lot of cased in our backend where we need to transfer a file from an external api to our storage. In almost all cases, the file is provided via an url. We download it from the endpoint in memory, and upload it to supabase again. It would be nice if the storage api could expose an endpoint that allows uploading a file by passing an url:
User passes url
supabase.storage.from('bucket').upload(filePath, 'https://some-url');
Storage Api makes HEAD request to get metadata of file
Check file size and content type returned by HEAD request against bucket config and throw if invalid
Storage Api downloads file from url directly to bucket at given
filePath
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions