[Zope] Pathnames in uploaded files
Wilson, Derek
dwilson at abrazohealth.com
Fri Nov 14 12:18:47 EST 2003
Well, I'd create a python expression to first reverse the string, then
un-reverse it while scanning for a "/,\,:" and stop.
Thanks,
Derek Wilson
-----Original Message-----
From: J Cameron Cooper [mailto:jccooper at jcameroncooper.com]
Sent: Thursday, November 13, 2003 3:00 PM
To: Mark Barratt
Cc: ZOPE ZOPE mailingliste
Subject: Re: [Zope] Pathnames in uploaded files
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)
_______________________________________________
Zope maillist - Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )
More information about the Zope
mailing list