Attachments are being named the full path name instead of the filename only
Test case
You have a topic to which you want to attach a document.
Browser is Internet Explorer on Windows XP.
We navigate to a file with path T:\var\www\twiki4\pub\Station\RobinLittleJohnCpk\Robin.ploticus
and upload it.
It now gets the
name T:\var\www\twiki4\pub\Station\RobinLittleJohnCpk\Robin.ploticus instead of just Robin.ploticus
I have had several users that have run into this problem.
In Cairo the same thing worked fine. The file ends up being named Robin.ploticus.
This is a serious bug and needs fixing for 4.0.3. I marked it as Requirement.
--
KJL
This appears to be an IE problem. it works fine on Firefox, but i can reproduce the problem on IE.
CC
"It's not a bug - it's a feature".
IE always has delivered the whole path, and there are hints to that in
CGI.pm
docs:
Different browsers will return slightly different things for the name. Some browsers return the filename only. Others return the full path to the file, using the path conventions of the user's machine. |
That's the problem: in r9834 (
Item2102) the somewhat shaky Cairo routine to strip filenames has been replaced by a call to
File::Spec
. But
File::Spec
works according the
server's operating system, so it can't work reliably on a file path which is valid on the
user's system.
I am confident that the first part of the patch in r9834 can be undone without making Item2102 popping up again - but I've only tested IE and Firefox with both an empty filename (which was the issue in 2102) and a complete path.
Sorry if I am duplicating CC's work - but I've been alarmed by the item summary because in our company IE is abundant, and I want to upgrade to 4.0.3, which is about to be released as far as I know....
--
TWiki:Main.HaraldJoerg