problem with uploading multiple files

when i upload a single file it works , but when i use a loop to upload multiple files (i'm using sveltekit):
for (let i = 0; i < thumbnails.length; i++) {
      const { data, error } = await supabase.storage
      .from('All files')
      .upload(`work/${thumbnails[i].name}`, thumbnails[i], {
          contentType: thumbnails[i].type,
      })
      console.log(data)
    }    
Was this page helpful?