You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would seem this library is doing something odd and against what the docs are stating. The docs state that if you set the upsert option to true while using the update method it should overwrite the file, but in the codebase it would seem the x-upsert header which is what upsert changes to is only set when doing a POST request and not a PUT. This means that only on the upload method does this option have any effect.
Bug report
Describe the bug
It would seem this library is doing something odd and against what the docs are stating. The docs state that if you set the
upsert
option totrue
while using theupdate
method it should overwrite the file, but in the codebase it would seem thex-upsert
header which is whatupsert
changes to is only set when doing aPOST
request and not aPUT
. This means that only on theupload
method does this option have any effect.To Reproduce
You can take a look at the method here: https://github.com/supabase/storage-js/blob/main/src/packages/StorageFileApi.ts#L84
You can have a look at the docs describing this here: https://supabase.com/docs/reference/javascript/storage-from-update?example=update-file
Expected behavior
when the
upsert
option is set to true when using theupdate
method, it should set thex-upsert
header.Screenshots
If applicable, add screenshots to help explain your problem.
System information
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: