Skip to content
New issue

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

Can't upload metadata when uploading a file #195

Open
shaaandi opened this issue Mar 12, 2024 · 0 comments
Open

Can't upload metadata when uploading a file #195

shaaandi opened this issue Mar 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@shaaandi
Copy link

Trying to upload some meta-data along with uploading the file and it's not working.

I am doing this

supabase.storage.from('bucket-name').upload('some-file-anme', file, {
  metadata: { ...some data }
})

I have also tried

    const fileBody = new FormData();
    fileBody.append('metadata', JSON.stringify({ name: 'data' }));
    fileBody.append('', file);
    supabase.storage.from('bucket-name').upload('some-file-anme', fileBody )

I see that it doesn't support any metadata type so please let me know how to add a metadata while uploading the file.
I need the metadata for some RLS policies later.

Thanks alot.

@shaaandi shaaandi added the bug Something isn't working label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant