Gangabass has asked for the wisdom of the Perl Monks concerning the following question:
Hi, Monks!
I'm getting strange error when working with CGI.pm (version 3.42). I use flash to upload files to the server. Flash object is embeded into HTML like so:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:/ +/www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <script type="text/javascript"> function goNext() { alert('All Files uploaded...'); } //--> </script> <style type="text/css"> h1{ color:#FF6200; font-size:1.67em; font-family:Arial,Helvetica,sans-serif; } body { color:#5E5E5E; font-family:Arial,Helvetica,sans-serif; font-size:16px; } </style> <h1 style="float:left;">Multiple File Uploader:</h1> <p style="float:right; display: inline; color: #000000; font-size:16px +"><b>Contact Me ::</b> gmail: apu.eee | yahoo: apu_eee | skype: wnee +ds</p> <div style="border:1px solid #E0E0E0; float:left; padding:2px;"> <div id="flashUpload" style="margin-left: 10px; width:500px; float:lef +t; height:490px;"> <object id="FlashFilesUpload" codebase="http://download.macromedia.com +/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" classid="clsid +:D27CDB6E-AE6D-11cf-96B8-444553540000" viewastext="" height="471" wid +th="499"> <!-- Replace symbols " with the " at all parameters values and sy +mbols "&" with the "%26" at URL values or & at other values! --> <param name="FlashVars" value="serverScripUrl=http://192.168.0.22/cgi- +bin/fileupload.pl?folder=uploaded"> <param name="Movie" value="fileupload.swf"> <param name="Src" value="fileupload.swf"> <param name="Play" value="-1"> <param name="Loop" value="-1"> <param name="Quality" value="High"> <param name="AllowScriptAccess" value="always"> <!-- Embed for Netscape,Mozilla/FireFox browsers support. Flashvars pa +rameters are the same.--> <!-- Replace symbols " with the " at all parameters values and sy +mbols "&" with the "%26" at URL values or & at other values! --> <embed bgcolor="#FFFFFF" id="EmbedFlashFilesUpload" src="http://www.gl +iq.com/admin/fileupload.swf" quality="high" pluginspage="http://www.m +acromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveF +lash" type="application/x-shockwave-flash" flashvars="serverScripUrl= +http://192.168.0.22/cgi-bin/fileupload.pl?folder=uploaded" height="47 +1" width="499"> </object> </div> </body> </html>
As you can see it use flashvars="serverScripUrl=http://192.168.0.22/cgi-bin/fileupload.pl?folder=uploaded" so i sends GET param folder=uploaded. But i did't see it :-(. In my program i can see only POST params.
I'm checking it this way:
#!/usr/bin/perl use strict; use warnings; use CGI; use CGI::Carp qw ( fatalsToBrowser ); use File::Basename; my $query = new CGI; open TEST, ">>", "test/params.txt" or die $!; $query->save( \*TEST ); close TEST;
And here is my params.txt file (three files uploaded):
Filename=Cristina_Aguilera.jpg Filedata=Cristina_Aguilera.jpg Upload=Submit%20Query = Filename=Charlizetheron_3.jpg Filedata=Charlizetheron_3.jpg Upload=Submit%20Query = Filename=Nelly_Furtado.jpg Filedata=Nelly_Furtado.jpg Upload=Submit%20Query = Filename=Fergie.jpg Filedata=Fergie.jpg Upload=Submit%20Query
So my question is where i miss folder param?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI.pm did't get GET params
by Corion (Patriarch) on Jan 22, 2009 at 09:11 UTC | |
by Gangabass (Vicar) on Jan 22, 2009 at 09:55 UTC |