Advertisement

09.19.2007 at 03:10PM PDT, ID: 22840060
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Mega Upload method.  Uploading to a temporary file with Perl, so PHP can access the file afterward

Tags: megaupload, temp, upload, file, mega
I'm putting together a Perl script that would handle uploading a file to a temp file, and then allow PHP to handle the rest.  I am having a problem with the upload() function in the Perl script.  If, in my form I have method="POST", then the upload function works; but if it's not there, then it gives me an upload error.  According to the Mega Upload method, http://www.raditha.com/megaupload/upload.php I do not need the method="POST".

-----------My html form-----------
    <form action="upload.pl" enctype="multipart/form-data">
        <label>Upload file: </label>
        <input type="file" name="userfile" id="file">
        <input type="submit" value="Upload" onClick="showLoading();" />
    </form


--------------Part of my Perl script---------------
use CGI;                  
use File::Temp qw/ tempfile tempdir /;

my $cg = new CGI;

my $file_upload       = $cg->param('userfile');
unless($file_upload) {
    die "Could not get the file: " . $cg->cgi_error . "\n";
}

if($file_upload) {
    my $fh = $cg->upload('userfile') || die "upload failure. $!";
    (my $tmp_fh, my $tmp_filename) = tempfile();

    while(<$fh>) {
        print $tmp_fh $_;
    }
    close($tmp_fh);
}
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: IMcoding
Solution Provided By: FishMonger
Participating Experts: 4
Solution Grade: B
Views: 17
Translate:
Loading Advertisement...
09.19.2007 at 04:09PM PDT, ID: 19925147

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.19.2007 at 04:19PM PDT, ID: 19925184

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.19.2007 at 07:29PM PDT, ID: 19925826

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.19.2007 at 07:38PM PDT, ID: 19925853

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.19.2007 at 07:46PM PDT, ID: 19925877

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.19.2007 at 11:39PM PDT, ID: 19926474

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.20.2007 at 10:07AM PDT, ID: 19929794

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628