Index: twikiplugins/BuildContrib/lib/TWiki/Contrib/Build.pm =================================================================== --- twikiplugins/BuildContrib/lib/TWiki/Contrib/Build.pm (revision 13078) +++ twikiplugins/BuildContrib/lib/TWiki/Contrib/Build.pm (working copy) @@ -1328,20 +1328,25 @@ # Upload other files described in the attachments list. They must be # in the pub directory. - $newform{'text'} =~ s/%META:FILEATTACHMENT(.*)%/push(@attachments, $1)/ge; - for my $a (@attachments) { - $a =~ /name="([^"]*)"/; - my $name = $1; - next if $uploaded{$name}; - $a =~ /comment="([^"]*)"/; - my $comment = $1; - $a =~ /attr="([^"]*)"/; - my $attrs = $1 || ''; + #SL: Useful to prevent being blacklisted by twiki.org when too many attachements. + my $doupattachements = ask("Do you want to upload the attachments?", 1); + + if ($doupattachements) { + $newform{'text'} =~ s/%META:FILEATTACHMENT(.*)%/push(@attachments, $1)/ge; + for my $a (@attachments) { + $a =~ /name="([^"]*)"/; + my $name = $1; + next if $uploaded{$name}; + $a =~ /comment="([^"]*)"/; + my $comment = $1; + $a =~ /attr="([^"]*)"/; + my $attrs = $1 || ''; - $this->_uploadFile( - $userAgent, $response, $this->{UPLOADTARGETWEB}, $to, $name, - $this->{basedir}.'/pub/TWiki/'.$this->{project}.'/'.$name, - $comment, $attrs =~ /h/ ? 1 : 0); + $this->_uploadFile( + $userAgent, $response, $this->{UPLOADTARGETWEB}, $to, $name, + $this->{basedir}.'/pub/TWiki/'.$this->{project}.'/'.$name, + $comment, $attrs =~ /h/ ? 1 : 0); + } } }