nuxt-hub / core

Build full-stack applications with Nuxt on CloudFlare, with zero configuration.
https://hub.nuxt.com
Apache License 2.0
802 stars 35 forks source link

fix(blob): remove slugify #154

Closed quandabase closed 2 weeks ago

quandabase commented 3 weeks ago

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

Atinux commented 3 weeks ago

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

quandabase commented 3 weeks ago

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

Atinux commented 2 weeks ago

What do you think of it @farnabaz ?

farnabaz commented 2 weeks ago

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.