We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seems it only happens in Cloudflare workers. I tried it in a normal NodeJs environment and it works well.
I tried to upload a file from a URL in Node.js. I always get an object with application/octet-stream mime type. Here is my code:
application/octet-stream
const { createClient } = require('@supabase/supabase-js') const supabase = createClient('SUPABASE_URL', 'SUPABASE_ANON_KEY') async function upload (url) { const blob = await fetch(url) .then(response => response.blob()) const fileName = 'test.' +blob.type.split('/')[1] const result = await supabase .storage .from('avatars') .upload(fileName, blob, { cacheControl: '3600', contentType: blob.type, upsert: true, }) console.log(result) } upload('https://tinypng.com/images/panda-happy-2x.png')
Copy this code and run it in Cloudflare workers.
The text was updated successfully, but these errors were encountered:
Related issue: cloudflare/workers-sdk#1085
Sorry, something went wrong.
No branches or pull requests
Bug report
Updates
Seems it only happens in Cloudflare workers. I tried it in a normal NodeJs environment and it works well.
Describe the bug
I tried to upload a file from a URL in Node.js. I always get an object with
application/octet-stream
mime type. Here is my code:To Reproduce
Copy this code and run it in Cloudflare workers.
The text was updated successfully, but these errors were encountered: