Jump to content

problem in displaying progress bar with percentage while uploading.


Recommended Posts

hello guys,

 

i need a help from u. from past 1 week , i am searching for it. may be it is simple query for you .

in my project, i am uploading a file,  for example 5mb of audio file, while uploading i need to display a progress bar along with percentage of  how much it is uploaded to server ( as it works in google chrome browser). i tried several codes by searching in google . No code is working.

i can able to display only loader.gif image not the status bar with percentage.

 

so pls guys if you have these codes, pls share it .

It's a combination of both. PHP allows you to track uploads, but you need sufficient permission on your server to be able to change a config directive (either with ini_set at run time or in the php.ini file). Essentially all you do is trigger the upload through a hidden iframe, and then fire off periodic AJAX requests with JavaScript to read the session state to get the current percentage.

 

Have a read: http://www.php.net/manual/en/session.upload-progress.php

 

Note that to use the above feature you have to be using php 5.4 with both session.auto_start and session.upload_progress.enabled turned on in your php.ini.

 

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.