> With the help of the group, I am now able to upload files to my server and
> get the orignal name of the file.
>
> What I do is then store the name of the file and the directory of where it
> is being placed in a database.  When the user goes to the summary page, I
> query the database and build a list of the files he has uploaded with
links
> to the files built from the information in the database.  Now, a problem
has
> come up in that if the file name has spaces such as: 120004 task list.xls
I
> am not able to display the file or even download it for the user.  I think
> it has something with these spaces in the file name.  Not sure how these
> space play when they are on a url line.
>

Spaces in an URL must be escaped as %20. When you inside of an attribute
which is a URL Embperl will do this for you, as long as you don't have
$escmode set to 0. When you construct your URL somewhere, where Embperl
cannot recognize it as URL, you need to escape it on your own. You can use
the method Escape of Embperl request object (so far undocumentated, but
hopefully this changes soon)

[-

$r = shift ;  # get Embperl's request object
$url = $r -> Escape ($unescaped, 2) ; # use 2 for url escaping and 1 for
html escaping

-]

Gerald

P.S. You can also run into trouble with spaces if you pass the filename to
any system command. In this case you have to quote it.



-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to