|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
G'day. I have a piece of ASP code that displays a list of filenames from an
SQL DB that a user uploads so other uses can download them. I do this all with HTTP because the user may be in a hotel that blocks FTP. All works exactly as expected except when a filename has a SPACE in it. For example: "new document.doc". Server.URLEncode won't fix it up becuase it returns the following result: "http:/www.bob.com/filedownloads/admin/New+Microsoft+Word+Document%2Edoc". If I change the %2E to a PERIOD, then Word attempts to open the docuemtn. This obviously won't work Can one do this, and if so how??? Or does one have to use filennames without spaces or do I have to convert the filename to 8.3??? Thanks. |
|
#2
|
|||
|
|||
|
It looks like you are urlencoding only part of the url string, otherwise the slashes, colon, etc would be converted to a hex string too.
The filename part looks correct, but there are a couple errors in the string you posted, like the final trailing period, the http:/ with only one slash
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Doug. The entore URL is correct. The missing "/" was a type, while the final PERIOD simply ends the sentence. BTW, I have it working now. It was a Windows Setting.
TX to all... Quote:
|
|
#4
|
|||
|
|||
|
Just out of curiosity, what windows setting did you have to change?
|
![]() |
| Viewing: ASP Free Forums > System Administration > Microsoft IIS > Create a Download Link for filenames with Spaces |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|