FilePicker
upload fails if original filename is modified
#5037
Labels
Milestone
FilePicker
upload fails if original filename is modified
#5037
Discussed in #5029
Originally posted by amgartendev March 5, 2025
Question
I'm experiencing an issue with
FilePickerUploadFile
. When I usefile.name
as the filename, everything works perfectly. However, if I modify the filename, even with a simple name like "hey.jpg", the upload fails. It does nothing.I didn't find anything in the documentation regarding this issue or how the filename should be passed. I assume the filename must be exactly the same as on the user's computer.
The problem with this is that I'm creating a web app where users can upload multiple images, and I'm trying to rename the file using a format like DATETIME_USER-ID.EXTENSION to avoid conflicts with other images that may have the same name, even if I separate each user's files into individual folders in the uploads directory.
For example:
Original Filename: image.jpg
Renamed Filename: 20250304_123.jpg
I tried uploading the image first, regardless of its filename, and then modifying it later. However, once the image is uploaded, it automatically replaces the previous version.
Code sample
Error message
The text was updated successfully, but these errors were encountered: