Microsoft IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationMicrosoft IIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 28th, 2005, 04:02 PM
Goomba Goomba is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 20 Goomba User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 47 m 17 sec
Reputation Power: 0
Question Create a Download Link for filenames with Spaces

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.

Reply With Quote
  #2  
Old April 29th, 2005, 12:23 AM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 21 h 32 m 23 sec
Reputation Power: 180
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

Reply With Quote
  #3  
Old April 29th, 2005, 07:06 AM
Goomba Goomba is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 20 Goomba User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 47 m 17 sec
Reputation Power: 0
Thumbs up

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:
Originally Posted by Doug G
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

Reply With Quote
  #4  
Old April 29th, 2005, 07:15 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 21 h 32 m 23 sec
Reputation Power: 180
Just out of curiosity, what windows setting did you have to change?

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationMicrosoft IIS > Create a Download Link for filenames with Spaces


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway