Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: retrieving users input Form the keyboard while perl is running in the remote webserver

by marto (Archbishop)
on Apr 09, 2019 at 20:04 UTC ( #1232365=note: print w/replies, xml ) Need Help??


in reply to retrieving users input from the keyboard while perl is running in the remote webserver

You don't say how you're dealing with the file upload, I more details a required in order to advise a solution.

  • Comment on Re: retrieving users input Form the keyboard while perl is running in the remote webserver

Replies are listed 'Best First'.
Re^2: retrieving users input Form the keyboard while perl is running in the remote webserver
by SearchigPerl (Acolyte) on Apr 09, 2019 at 20:18 UTC
    Hi there,
    thanks for your quick reply! This is THW code oft the upload-code:
    <br> use CGI; use CGI::Carp qw ( fatalsToBrowser ); use File::Basename; $CGI::DISABLE_UPLOADS=0; # Allow file uploads my $query = new CGI; my $filename = $query->param("datei"); my $kunde = $query->param("kunde"); my $upload_dir =$query->param("ziel"); my $groesse = $query->param("groesse"); my $action ="upload ".$filename; undef $fehler; $CGI::POST_MAX = 1024 * $groesse; $content_length = $ENV{'CONTENT_LENGTH'}; if ($content_length > $CGI::POST_MAX){ erlaubnis(); if ($sonder ne 'xxx'){ $fehler =" Datei groesser als erlaubt!"; goto Meldung; # custom request entity too large error handling } } }


    Hope that helps ?
    Cheers!

      So if you can stand JavaScript, and most people can, you could do something like this to get the file size before uploading. If your application can keep track of how much free space you have, a very basic example would be either querying this when rendering the upload page, or via a call back before you begin the file upload. As a side note your closing code tag should be </code>, rather than <code>.

        This is definetly pointing in into the right direction!
        However, I guess it can't work on machines that block Java, can it ?
        As an explanation : I am offering webspace to my students in order they can share project-related files,
        but just those (meaning no Films, etc.) Only persons worth trusting (meaning me)
        should be able to upload larger files. As a traveller I am working on different computers
        which I can not alter...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1232365]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2019-07-17 02:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?