79825423

Date: 2025-11-20 11:03:44
Score: 0.5
Natty:
Report link

Update: It turns out I was forgetting to specify the contentType in the fileOptions argument of the Supabase upload function.

For the contentType the Supabase docs say:

Should be specified if using a fileBody that is neither Blob nor File nor FormData, otherwise will default to text/plain;charset=UTF-8.

In Supabase bucket upload:

let {data : bucket_file, error: upload_error} = await supabase.storage
    .from('avatars')
    .upload(filePath, decode(image.base64), {
        contentType: photo.type, 
        upsert: true
    })
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: 1million_ naira