Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: long file names & virtual folders


Message #1 by "Cam T" <camtlist1@m...> on Mon, 20 Aug 2001 16:54:14
I built a little site for storing documents on a website.  Each record has 

a filename, size, date, a description (manullay entered upon upload).



Everything works fine except the following:

1. I need to be able to replace spaces and/or invalid characters in 

filenames.  Currently a long filename doesn't work as the link would look 

like this: /files/path/file name.txt

I need to display: /files/path/file%20name.txt



2. Uploading files from a virtual folder (Desktop, My Documents) doesn't 

work.  I am using a free script called ASPSmartUpload, just curious if 

anyone knows how to get around this, if possible (not sure if its the 

ASPSmartUpload or something else).



Message #2 by David Cameron <dcameron@i...> on Tue, 21 Aug 2001 12:05:13 +1000

1. Use the function

Replace(MyString, "<string searching for>", "<replacement>")

for each illegal char.



2. Check the permissions for the folders. IUSR_<yourmachinename> (the IIS

account) needs to have permissions to save to that location. Saving to

MyDocuments or Desktop is a v. bad idea as for one thing it is dependant on

the user logged onto the computer. Another question is how will they

retrieve the files? If you are going to use ftp save them under your ftp

folders.



regards

David Cameron

nOw.b2b

dcameron@i...



-----Original Message-----

From: Cam T [mailto:camtlist1@m...]

Sent: Tuesday, 21 August 2001 2:54 AM

To: ASP Databases

Subject: [asp_databases] long file names & virtual folders





I built a little site for storing documents on a website.  Each record has 

a filename, size, date, a description (manullay entered upon upload).



Everything works fine except the following:

1. I need to be able to replace spaces and/or invalid characters in 

filenames.  Currently a long filename doesn't work as the link would look 

like this: /files/path/file name.txt

I need to display: /files/path/file%20name.txt



2. Uploading files from a virtual folder (Desktop, My Documents) doesn't 

work.  I am using a free script called ASPSmartUpload, just curious if 

anyone knows how to get around this, if possible (not sure if its the 

ASPSmartUpload or something else).






  Return to Index