Hey all -
I'm currently trying to do the following:
1. Devices are doing http post to to static URL which cannot be changed
2. I've created an .aspx page to receive a file post
Now I need to create a perl script which forward the initial http post request to my .aspx page.
Any help would be greatly appreciated.
I've started to modify the following script :
#!/usr/bin/perl -w
use CGI;
use File::Basename;


$query = new CGI;

print $query->header ( );
print $query->start_html();
print "Upload result:<br>"; # At least one symbol should be sent to response!!!

$upload_dir = "c:/temp" ; # dirname($ENV{'PATH_TRANSLATED'})."/UploadedFiles/"

print $upload_dir;

my $filename = $query->param("Filedata");
$filename =~ s/.*[\/\\](.*)/$1/;
my $upload_filehandle = $query->upload("Filedata");

if(defined($upload_filehandle))
{
open UPLOADFILE, ">$upload_dir\\$filename";
binmode UPLOADFILE;
while ( <$upload_filehandle> )
{
print UPLOADFILE;
}
close UPLOADFILE;
print "file \"$filename\" uploaded";
}
else
{
print "No files sent. Script is OK!"; # Say to Flash that script exists and can receive files.
}
print $query->br();


print "--------------";
print $query->end_html();