Skip to content

Conversation

@0cch0
Copy link
Contributor

@0cch0 0cch0 commented Jun 10, 2024

Converting filename to a slug format is not necessary for uploading files to Cloudflare R2

@atinux
Copy link
Contributor

atinux commented Jun 10, 2024

But isn't it safer anyway to slugify it @quandabase ? What is your use case?

@0cch0
Copy link
Contributor Author

0cch0 commented Jun 10, 2024

But isn't it safer anyway to slugify it @quandabase ? What is your use case?

i just want the filename is exactly when i name it, so when download the file i just use that name, now i have to save the return path name to download the file because the filename is different, maybe add an option for this case

Copy link
Contributor

atinux commented Jun 10, 2024

What do you think of it @farnabaz ?

Copy link
Collaborator

Preserving exact pathname in the put function sounds reasonable.
As for safety, I think it is not a much of concern in blobs since it only uses to match file name. Cloudflare R2 buckets and Amazon S3 does not slugify paths either.

@atinux atinux changed the title Update blob.ts (remove slugify) fix(blob): remove slugify Jun 11, 2024
@atinux atinux merged commit d4133a9 into nuxt-hub:main Jun 11, 2024
Aslemammad pushed a commit to Aslemammad/nuxt-core that referenced this pull request Jun 12, 2024
Co-authored-by: Sébastien Chopin <seb@nuxt.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants