Folks (or, anyway, Edi)--
When I upload a file, I get a structure something like:
("file" #P"/tmp/tbnl/tbnl-10" "Water Lillies.jpg" "image/jpeg")
which is just fine. Documented, after all. And this works using firefox on both linux and windows.
BUT, when I use IE on windows (where else), I get:
("file" #P"/tmp/tbnl/tbnl-10" "C:\\Documents and Settings\\All Users\\Documents\\Sample Pictures\\Water lilies.jpg" "image/pjpeg")
As you can imagine, this causes a slight bit of weirdness when I try to move the file from /tmp to my asset store. Amazingly, the pictures is copied. The name is a bit long. But in IE, at least, I can't "view" the picture as it translates to images/C:/Documents....
FWIW: images are served by apache, not TBNL.
Easily fixable? Or should I just try for a regex to remove everything up to the last \ or /?
--K {}
ps. Interestingly, firefox on windows properly escapes the slashes so the image does get rendered.
Hi!
On Mon, 27 Jun 2005 14:04:10 -0700, Keith Irwin keith.irwin@gmail.com wrote:
When I upload a file, I get a structure something like:
("file" #P"/tmp/tbnl/tbnl-10" "Water Lillies.jpg" "image/jpeg")
Hey! I used the same test file... :)
which is just fine. Documented, after all. And this works using firefox on both linux and windows.
BUT, when I use IE on windows (where else), I get:
("file" #P"/tmp/tbnl/tbnl-10" "C:\\Documents and Settings\\All Users\\Documents\\Sample Pictures\\Water lilies.jpg" "image/pjpeg")
As you can imagine, this causes a slight bit of weirdness when I try to move the file from /tmp to my asset store. Amazingly, the pictures is copied. The name is a bit long. But in IE, at least, I can't "view" the picture as it translates to images/C:/Documents....
FWIW: images are served by apache, not TBNL.
Easily fixable?
There's nothing to fix, actually. The docs say
"file-name (a string) is the file name sent by the browser"
and that's what you see. "Fixing" this would mean to remove information.
Or should I just try for a regex to remove everything up to the last \ or /?
That's what I do.
Cheers, Edi.
On Mon, 27 Jun 2005 15:24:17 -0700, Keith Irwin keith.irwin@gmail.com wrote:
Okay. Will do. Ah, one's code starts out so pristine.... ;)
Hehe, I know that feeling... :)
On 2005-06-27 14:04:10, Keith Irwin wrote:
("file" #P"/tmp/tbnl/tbnl-10" "C:\\Documents and Settings\\All Users\\Documents\\Sample Pictures\\Water lilies.jpg" "image/pjpeg")
That's more a common web development problem with IE. Wrong Content-Type and a complete path instead of the filename.
By the way: I've once seen a really stupid project management software which really saved the whole path, but not the file itself.
Braindead in a heterogeneous environment with Linux, Macs, and Windows.
On 6/28/05, Stefan Scholl stesch@no-spoon.de wrote:
On 2005-06-27 14:04:10, Keith Irwin wrote:
("file" #P"/tmp/tbnl/tbnl-10" "C:\\Documents and Settings\\All Users\\Documents\\Sample Pictures\\Water lilies.jpg" "image/pjpeg")
That's more a common web development problem with IE. Wrong Content-Type and a complete path instead of the filename.
Although I do a lot of web development, I have to admit it's been years since I've done any sort of file upload stuff. I think PHP takes care of it, as did some Java class I used almost five years ago. I'll have to test with an IE upload and PHP when I get into the office a bit later, but I'm almost sure I tested with IE and the filename came through without the path.
You guys would happen to have the relevant regex handy, would you? ;)
Time to break out the regex coach.
--K
By the way: I've once seen a really stupid project management software which really saved the whole path, but not the file itself.
Braindead in a heterogeneous environment with Linux, Macs, and Windows.
tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel