Change File Name Automatically
Hi there,
Any idea how I can automatically change the name of the file to the origin file name when I upload it? Should I input this somewhere in my database? For instance the excel name is Model.xlsx but it appears like that in the picture (see attached). I basically plan to add a FileName String to my model Attachment in my schema.prisma, but then when I call the uploadthing service I can save the name only if the upload were succeed
I can do it sending the string when I call the service or I could save after the uploading service answer succeed but I have to get the name of the file first when I use the uploadform
Any idea how to modify the pages to make this happen? Thanks a lot
Thanks for the help
Yuccie
Any idea how I can automatically change the name of the file to the origin file name when I upload it? Should I input this somewhere in my database? For instance the excel name is Model.xlsx but it appears like that in the picture (see attached). I basically plan to add a FileName String to my model Attachment in my schema.prisma, but then when I call the uploadthing service I can save the name only if the upload were succeed
I can do it sending the string when I call the service or I could save after the uploading service answer succeed but I have to get the name of the file first when I use the uploadform
Any idea how to modify the pages to make this happen? Thanks a lot
Thanks for the help
Yuccie
