<?xml version="1.0" encoding="windows-1252"?>
<node id="958688" title="Re^2: @CGI $q-&gt;upload() doesnt work properly" created="2012-03-09 06:39:35" updated="2012-03-09 06:39:35">
<type id="11">
note</type>
<author id="893562">
perlig</author>
<data>
<field name="doctext">
hm ok..&lt;br&gt;&lt;br&gt;

but thats not new to me.. the code i show you is only part of an package. the cgi object lies in the main. for that itīs not a scoping issue. &lt;br&gt;
&lt;code&gt;  my $filename = $q-&gt;param('upload_file');
&lt;/code&gt;
gives exactly the filename of the uploaded file. but not full qualified. &lt;br&gt; here you are right:&lt;br&gt;
&lt;code&gt;$CGI::DISABLE_UPLOADS&lt;/code&gt;&lt;br&gt;
$main::q is initialised in the main with &lt;br&gt;&lt;code&gt;our $q = new cgi;&lt;/code&gt;&lt;br&gt;
but the attribute should set like &lt;code&gt;    use CGI qw/:standard/;
    use CGI::Carp 'fatalsToBrowser';
    $CGI::POST_MAX=1024 * 100;  # max 100K posts
    $CGI::DISABLE_UPLOADS = 1;  # no uploads&lt;/code&gt;
thanks for the pointer.&lt;br&gt;
like Eliya said:
&lt;code&gt;my $filename   = $q-&gt;param('upload_file');    # returns (client-side) 
+name of the file
my $filehandle = $q-&gt;upload('upload_file');   # returns handle to the 
+server-side temp file
&lt;/code&gt;
thats still my code. but the filehandle is empty. thats what i want to fix. i want to know what this function do:&lt;code&gt;$q-&gt;upload('upload_file');&lt;/code&gt; because it might be that there is a problem with fetching the data from the client..?!
&lt;br&gt;sorry 4 my worse diction..
&lt;br&gt;


&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-893562"&gt;
$perlig =~ s/pec/cep/g if 'errors expected';

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
958464</field>
<field name="parent_node">
958566</field>
</data>
</node>
