summaryrefslogtreecommitdiff
path: root/doc/bugs/attachment_upload_does_not_work_for_windows_clients.mdwn
blob: de57a1441248c6beeeefecfd3450635e536d35d1 (plain)

It seems as if windows clients (IE) submit filenames with backslash as directory separator. (no surprise :-).

But the attachment plugin translates these backslashes to underscore, making the whole path a filename.

This little hack fixed the backslash problem, although I wonder if that really is the problem? (Everything works perfectly from linux clients of course. :-)

sub basename ($) {
	my $file=shift;

	$file=~s!.*/+!!;
	$file=~s!.*\\+!!;
	return $file;
}

Should probably be $file=~s!.*[/\\]+!! :-)