Uploaded file name gets changed

Is there a way around the issue of uploaded filenames being changed if they contain any space, dash or other non alphanumeric characters?
I have a form with a Document(File Name) field that I use to upload a file.

For example if I upload 2025-08-11_23-01-10.png, checking the name in the variable shows this:
/_lib/tmp/sc_04018cb8_2025__SC_MINUS__08__SC_MINUS__11_23__SC_MINUS__01__SC_MINUS__10.png

This causes issue trying to use this file as part of an email attachment.

If I was to rename the file to remove the dash and underscore characters, everything works as expected.

I have the same problem.
It would also be nice if you could resize and compress the image.
When you capture an image from a phone, it takes up a lot of MB.

This behavior is standard in Scriptcase for security and compatibility reasons—non-alphanumeric characters are replaced to avoid issues. As a workaround, you can store the original filename in a separate database field when uploading, and then use PHP’s rename() function to restore the name before sending the email attachment. Alternatively, when attaching files in your script, refer to the original filename for the email display, even if the file itself uses the modified name on the server. This way, the recipient will see the correct filename.