The attachment table gets confused if you upload a file that has spaced WikiNames, i.e. if you upload C:\path\file with WikiName

Fix:

In function getAttachAttr of attach script add this:

 ( $before, $item, $after ) = split( /<(?:\/)*TwkFileName>/, $set ); if( ( $item ) && ( $item eq $fileName ) ) { ( $before, $filePath, $after ) = split( /<(?:\/)*TwkFilePath>/, $set ); if( ! $filePath ) { $filePath = ""; } $filePath =~ s///go; if( $1 ) { $filePath = $1; } else { $filePath = ""; }  $filePath =~ s/\%NOP\%//goi;	# delete placeholder that prevents WikiLinks ( $before, $fileSize, $after ) = split( /<(?:\/)*TwkFileSize>/, $set ); 

In function updateAttachment of upload script add this:

 my $before="", $item="", $lcItem="", $after="", $set="", $ins="", $comp=""; my $lcFileName = lc $fileName; my $fileIcon = filenameToIcon( $fileName );  # prevent links for $filePath, i.e. "\some\File with WikiName.txt" $filePath =~ s/([\(\-\*\s]+)([A-Z]+)/$1\%NOP\%$2/go;  my $result = $atTableBefore; my $found = 0; 

Commited to TWikiAlphaRelease.

-- PeterThoeny - 04 Dec 2000

TopicClassification:
BugResolved
Topic revision: r1 - 2000-12-05 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.