Jump to content

How to make a progress bar for a file upload ?


Forki

Recommended Posts

I made a website with AJAX and PHP for uploading and managing files. Not only files but also a lot of metadata and permissions. I have one page with a private, shared and public workspace. A form to create/modify/move/delete a folder or file is just a new layer on top of the current contents of the webpage. When a user presses submit, data is send to server thru ajax, data is checked. If OK a return message is send with an OK and the form disappears, otherwise the fields with the errors are highlighted. For a file upload I use a hidden iframe where the server sends a generated javascript: when OK form disappears, otherwise fields with the errors are higlighted. It is not just a file upload, but users has to specify a lot of metadata for each file depending on the type.
For large files I need something for the users so that they can see that the upload is busy, but I would like to close the form so that the users can contunue working. For this I need the upload of the file and display of the progress bar take place in a a different window or in another frame/place.

I will probably will have to use a perl-script to accomplish this, but I want to keep it as basic as possible. Just a progressbar, or maybe bytes send versus total bytesize, ... But only one file needs to be uploaded at the time.

Any solutions ?

Thanx,

JM

Link to comment
Share on other sites

Johan,

Try here for a perl script that works well:

http://encodable.com/filechucker/

For a PHP script, try here:

http://www.devpro.it/upload_progress/

Scot L. Diddle, Richmond VA
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.