Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

ASP Upload 3 filenames

Posted 20 May 2008 21:57:35
1
has voted
20 May 2008 21:57:35 mad anthrax posted:
<font face='Arial'>I have used ASP Upload 2 for a long time. ASP Upload 3 is even better. However one problem has turned up recently. Users that upload files with # in the filename cannot use the hyperlink to access it on file list page. ASP Upload 2 filters out invalid characters, everything except . and _ . Why does version 3 not do this? Have I got an out of date version, or has someone at DMX missed this???

Thanks in advance for any answers.

Anthony.</font id='Arial'>

Replies

Replied 22 May 2008 17:29:19
22 May 2008 17:29:19 mad anthrax replied:
Ok, I have fixed it.

This fix removes # from the filename of the uploaded file. It also removes it from the filename sent to the database. This has only been tested on a situation where you specify only the name of the file to be sent to DB, not the complete path.

Without # in the filename returned from the DB the hyperlink to the file does not fail.

<b>If you do not understand any part of this explanation don't mess with this fix. I give no guarantee this will not affect some other part of the upload process. Always make a backup of the incPU3Class.asp file in the scriptlibrary folder before editing it.</b>

Fix:
Open file \scriptlibrary\incPU3Class.asp

Edit line 728 which looks like this: <i>Control.FileName = real_fn</i>

and change to: <i>Control.FileName = replace(real_fn, "#", ""</i>

Anthony.

Reply to this topic