[Zope] Pathnames in uploaded files

J Cameron Cooper jccooper at jcameroncooper.com
Thu Nov 13 16:59:31 EST 2003


Mark Barratt wrote:

> I have a dialogue that uploads files to LocalFS. When I upload a file 
> from my Windows machine it uploads filename.ext. When another person 
> uploads a file from their Windows machine it uploads a file called 
> \\complete\path\to\filename.ext.
>
> Any idea why this should be?

It shouldn't be. But IE in at least some popular incarnations uploads 
the entire path of the file as a name. Naturally, this is against 
considerations of privacy, security, and interoperability. (Plus, 
probably, standards compliance.)

> And how to stop it?

Glibly, use a browser that isn't broken. There are work-arounds, of 
course, and you can find them on the list (or simply think up a simple 
Python expression that will fix this.) But it's very hard to make a 
universal solution to the problem because of the wide variety of path 
notations.

          --jcc

-- 
"Code generators follow the 80/20 rule. They solve most of the problems, but not all of the problems. There are always features and edge cases that will need hand-coding. Even if code generation could build 100 percent of the application, there will still be an endless supply of boring meetings about feature design."
(http://www.devx.com/java/editorial/15511)





More information about the Zope mailing list