Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

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


in reply to Re^2: retrieving users input Form the keyboard while perl is running in the remote webserver
in thread retrieving users input from the keyboard while perl is running in the remote webserver

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>.

  • Comment on Re^3: retrieving users input Form the keyboard while perl is running in the remote webserver
  • Select or Download Code

Replies are listed 'Best First'.
Re^4: retrieving users input Form the keyboard while perl is running in the remote webserver
by SearchigPerl (Acolyte) on Apr 09, 2019 at 20:52 UTC
    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...

      For completeness, yes, this is JavaScript, rather than Java. Unless you're using some sort of client side technology (JavaScript etc) then you are not going to be able to identify the file size before upload. By default JavaScript is enabled on all mainstream browsers, for quite some time now. Other than that you're dependent on trying to upload the file and checking. See also CGI -> Processing a file upload field, including the section on legacy usage.

        I see ! So Java-Script then asking for the password most likely is going to do the job.
        Thanks a lot for your explanations and hints!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2019-07-21 04:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?






    Results (7 votes). Check out past polls.

    Notices?