0

I'm trying to figure out if there's a way to get the progress of a file upload with PHP and/or Kohana. My script can upload images, videos, zip, exe, whatever I want really. However the larger the file the longer the user has to wait without any indication.

I was hoping to use some AJAX here to initialise the upload and then report back the progress.

Is this possible with PHP... and can anyone give me an indication of where to start looking.

1
  • I always use this file uploader plubin... it is too much in that plugin... but it has what you are looking for... please have a look if this of any help... valums.com/ajax-upload Commented Apr 28, 2011 at 11:28

3 Answers 3

1

there is a file upload progress extension for php, see http://www.ultramegatech.com/blog/2010/10/create-an-upload-progress-bar-with-php-and-jquery/ for how to use it.

Sign up to request clarification or add additional context in comments.

Comments

0

I like to use a server module to do this sort of thing, mainly because it makes my life as a web developer easier if all I need to do is grab upload statistics from a URL. Nothing has to be changed in your website.

For Nginx there is the Upload Progress module and it should work on all recent releases. You can find code examples on the Nginx Wiki: http://wiki.nginx.org/HttpUploadProgressModule

For Apache there is the Upload Progress too. I haven't used it myself, but it seems fairly straight forward.

If you don't have access to the server configuration, then you might want to fall back onto a pure flash / javascript solution. For this I had good luck with Uploadify in the past, but it requires a bit more work as you now have to upload files in a separate request. Someone should be able to suggest a good HTML5 upload progress plugin too.

1 Comment

The server I'm on is an Apache server, so I will try out Upload Progress.
0

you could do this also with apache and APC example

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.