Hello

I was wondering whether it was possible to get an indication on the progress of the upload a file to a server.

I would like to allow a user to upload a file, using the <input type="file"> tag.
The image could potentially be very large. As such I would like to display a popup window which will display a progress bar indicating the progress of the upload process.

I was wondering whether it is possible to get an indication on how many bytes have been uploaded to the server so far, so I could update the popup window to reflect how many bytes have been uploaded.

For example, the popup window would say:
"Uploaded 256K / 1.6MB, estimation: 2 minutes"
This text should change in runtime as the file is uploading. This means that the server will need to interact with the popup window (probably via an iframe).
Is the amount of bytes uploaded so far is available to me or can I obtain it somehow?

Is what I want to do at all possible using JavaScript and PHP?

I would appreciate any thought on this concept.
david

    Ok Javascript and PHP will not fix this PHP is a server side language and cannot get any information from the client. Javacript is of course the opposite but due to users disabling and security issues Javascript cannot get information from the client on how big the file they are uploading is. Ive seen examples in Java (not Javascript but the actual Programming Language) and Flash however I feel they are a bit of over kill for such a thing and users require the plugins to use either.

      Write a Reply...