Hi
we are getting the following error while trying to upload the file on teamsite server
"
Software error:
Malformed multipart POST
For help, please send mail to the webmaster (you@yourdomain.com), giving this error message and the time and date of the error.
"
code segment from ipl file which is calling
,
"print<<"END";
<body>
<form action="/x/iw-bin/FileUpload.cgi" method="post" enctype="multipa
+rt/form-data" >
<p> File to Upload: <INPUT TYPE="file" NAME="file" > </p>
<p> <input type="submit" value="SEND FILE" /></p>
<p> <input type="reset" value="CLEAR" /></p>
</form>
</body>
</html>
END
"
this is upload.cgi.(it is written in interwoven perl so it may be difficult to unstd but i am really stuck at this issue so i am posting in case it helps to find a solution)
"#!D:\PROGRA~1\INTERW~2\TeamSite/iw-perl/bin/iwperl
#---------------------------------------------------------------------
+--------
#
#---------------------------------------------------------------------
+--------
=head1 NAME
=cut
use TeamSite::CGI_lite;
use CGI;
use CGI::Carp qw ( fatalsToBrowser );
use File::Basename;
$|=1;
$cgi = TeamSite::CGI_lite->new();
$cgi->parse_data();
print<<"END";
Content-type: text/html; charset=utf-8
<html>
<HEAD>
</HEAD>
END
my $iwmnt = "y:" ;
$main=$cgi->escape_html_data($cgi->{form}{'vpath'});
print $main;
my $safe_filename_characters = "a-zA-Z0-9_.-";
$import_target_path = $iwmnt . $main;
my $query = new CGI;
my $filename = $query->param("file");
$filename =~ s/.*[\/\\](.*)/$1/;
my ( $name, $path, $extension ) = fileparse ( $filename, '\..*' );
$filename = $name . $extension;
$filename =~ tr/ /_/;
$filename =~ s/[^$safe_filename_characters]//g;
if ( $filename =~ /^([$safe_filename_characters]+)$/ )
{
$filename = $1;
}
else
{
die "Filename contains invalid characters";
}
my $upload_filehandle = $query->upload("file");
open ( UPLOADFILE, ">$import_target_path/$filename" ) or die "$!";
binmode UPLOADFILE;
while ( <$upload_filehandle> )
{
print UPLOADFILE;
}
close UPLOADFILE;
print<<"END";
<body>
<p>Thanks for uploading </p>
<p>$filename</p>
</body>
</html>
END
"
regards,
rahul
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.