Anyone have a problem storing Documents where a filename contains a #

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Anyone have a problem storing Documents where a filename contains a #

Post by Jaymer »

I have an Attachments BO.
I got a report that if a user uploads a Document like "Acme Corp - Invoice # 12345" then it will upload fine,
and gets stored in the correct directory, but when the user tries to re-open the attachment, an error appears:

Screen Shot 2021-01-14 at 12.14.35 PM.png
Screen Shot 2021-01-14 at 12.14.35 PM.png (40.69 KiB) Viewed 2089 times
It appears it is an error as Aware builds the URL to open... not a 'real' issue with the file.
The filename (in the title of the window) is correct.
But the "Message" field is truncated before the "#" symbol, which results in an INVALID URL.

Should this be happening?
Is it something Aware can correct?

If not, I will have to make the users manually rename these docs before uploading which will be a big pain.
I don't want to use REPLACE_PATTERN because then the uploaded file will have the "#" removed, but the original filename will still have it.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
himanshu
Posts: 722
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: Anyone have a problem storing Documents where a filename contains a #

Post by himanshu »

Jaymer,

I believe you still able to create another attribute to store the filename and use that to store into the path. I use to replace the spaces or any such symbol by '_' underscore to create a new filename with same extension. This will also solve issue at some point spaces within file name causes issue.
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Anyone have a problem storing Documents where a filename contains a #

Post by Jaymer »

@ Himanshu
hey, you're correct. I just tried this with a file with spaces in the name.
got a broken image link when trying to view it.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply