supabase/storage-js

Signed URLs are not URI Encoded

psteinroe opened this issue ยท 3 comments

Bug report

Describe the bug

When creating a signed url for a file that has e.g. a space in its name, the signed url is not url encoded and needs to be wrapped with encodeURI() (in js).

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to storage
  2. Upload a file with a space in the name to a bucket with RLS
  3. Copy the url of the file

Or in code:

const { data, error } = await adminClient.storage
          .from('message_files')
          .createSignedUrl(`${messageId}/my file.jpg`, 2592000)

Expected behavior

The uri should be encoded.

๐ŸŽ‰ This issue has been resolved in version 1.8.0-next.2 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

๐ŸŽ‰ This issue has been resolved in version 2.0.0-rc.1 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

๐ŸŽ‰ This issue has been resolved in version 2.0.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€