supabase-js icon indicating copy to clipboard operation
supabase-js copied to clipboard

Unable to move objects between buckets

Open huaizhic opened this issue 1 year ago • 1 comments

Bug report

  • [✔ ] I confirm this is a bug with Supabase, not with my own application.
  • [✔ ] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

A clear and concise description of what the bug is.

From the docs (https://supabase.com/docs/guides/storage/management/copy-move-objects), it mentions the ability to copy/move objects from one bucket to another by adding a destinationBucket header to the API call. However, the object is only moved/copied within the same bucket, effectively ignoring the destinationBucket header added at the end.

To Reproduce

Screenshot 2024-05-16 144842

Source Bucket: 'catalog-public' Source Bucket path: 'testing/testing(slot1)' Destination Bucket: 'catalog-private' Destination Bucket path: 'testing2/testing(slot1)'

Expected behavior

File 'testing(slot1)', from folder 'testing', is expected to be copied/moved from bucket 'catalog-public' to folder 'testing2' in bucket 'catalog-private'.

Screenshots

However, the file is being copied/moved in the source bucket 'catalog-public' instead.

image

System information

  • OS: Windows
  • Browser: Chrome
  • Version of supabase-js: 2.3.9
  • Version of Node.js: 18.16.0

Additional context

I have made RLS policies of the buckets to allow anonymous users to make modifications in order to isolate the problem.

huaizhic avatar May 16 '24 06:05 huaizhic