0

I am trying to set up file upload function as in http://jquery.malsup.com/form. But the example for file upload with progress bar do not have the server side script example.

All that i know is to process the $_FILES, $_POST, sanitise, and save; but not able to figure how to send progress bar data from server to browser. I am not sure how uploadProgress get data from file_echo2.php in the example http://www.malsup.com/jquery/form/progress2.html

Can some one hint me in how to capture the file upload progress while it is uploading? Thanks in advance.

Srikanth S
  • 1,717
  • 5
  • 16
  • 21

1 Answers1

1

Well there is nothing that needs to be done on the server side script ! On the client side javascript, hook a function to handle uploadProgress event. uploadProgress returns the values event, position, total, percent. make use of percent value to show a progress bar or any other way you want it behave.

I had particularly zeroed on this (among a wide variety of choices like plupload, uploadify etc) because it do not use any flash files. Now that i learnt that this needs no special server side script to handle is a huge plus point.

Many thanks to malsup and more details at jquery plugin

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Srikanth S
  • 1,717
  • 5
  • 16
  • 21