in reply to MooTools - how to grab file contents?

I guess it would help us what the "remote side" is sending. Most likely, if it is some fancy uploading thing, you can fake that by using a plain HTML page that does the file upload instead, or by using wget or curl to send the file upload data.

It might also help to read the documentation of CGI, especially about file uploads. According to it, $cgi->param('Filename') will be both, a filehandle to the uploaded data as it has arrived and the filename. But you haven't told us (or the developers at that other forum) what you're doing.

As with any Ajax site, please get it to work without Javascript first before trying to add Javascript to the problem.

Replies are listed 'Best First'.
Re^2: MooTools - how to grab file contents?
by ultranerds (Hermit) on Sep 14, 2010 at 08:26 UTC
    Hi,

    Yeah, I've tried it with this too:

    my $fh = $cgi->param('File name'); while (<$fh>) { print $_ }


    ..but that again prints out nothing

    Will have another play around with it later today, to see if I can get it working (and will try as you suggested, with a simple HTML form, without the JS code)

    Cheers

    Andy
      Maybe
      use Data::Dumper; print Dumper $cgi;
      might reveal something useful?
        or print $fh, ':',ref $fh;