Hello, when uploading images to storage, like ```c...
# help
d
Hello, when uploading images to storage, like
Copy code
const avatarFile = event.target.files[0]
const { data, error } = await supabase
  .storage
  .from('avatars')
  .upload('public/avatar1.png', avatarFile, {
    cacheControl: '3600',
    upsert: false
  })
I have a path like categories/sport/football, Do i need to have public first, then categores/sport/fotboll? Or does it work, because when i upload now, i get error, but when i added public before i didnt get an error but it still uploads in both ways.
n
Hello @Dembe! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
g
If you don't have a "folder" public in your avatars bucket then you would not use it in a path whether the bucket is public or private. Not sure if storage code knows to ignore it in a public bucket or not.