pingdotgg / uploadthing

File uploads for modern web devs
https://uploadthing.com
MIT License
4.04k stars 295 forks source link

[Bug]: Provide a way to change filename when uploading #160

Closed ardinusawan closed 1 year ago

ardinusawan commented 1 year ago

What happened?

When filename contains space I need to replace it with underscore

What did you expect to happen?

d64d7245-b707-4b98-b57a-ea357a8022ce_WhatsApp Image 2023-06-02 at 10.00.56 AM.jpeg become d64d7245-b707-4b98-b57a-ea357a8022ce_WhatsApp_Image_2023-06-02_at_10.00.56_AM.jpeg

Version

4.1.2

Reproduction Steps

No response

Reproduction Repository

No response

Relevant log output

No response

Code of Conduct

markflorkowski commented 1 year ago

I am not sure that we will build this functionality into the base uploadthing components, since solving this in a generic way is not exactly trivial and would likely be cumbersome to use.

You should be able to this with custom components using our useUploadthing hook.