AnantLabs / ocupload

Automatically exported from code.google.com/p/ocupload
0 stars 0 forks source link

Doesn't work with uploadprogress php extension #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This extension is used to show progress of uploads. To make it work you need to 
place field with name="UPLOAD_IDENTIFIER" right before file field. In current 
realisation of ocupload, all params are writen after file field.

It can be fixed by prepending this param to a form (instead of appending it).

Original issue reported on code.google.com by e.v.sold...@gmail.com on 2 Dec 2010 at 12:18

GoogleCodeExporter commented 9 years ago
I have fixed version of this plugin which works shows real progress bar and 
works with Zend_Progress_Bar (which internally uses apc or uploadprogress 
extension whichever is available).

cheers,

peter

Original comment by Fr0z3...@gmail.com on 22 May 2011 at 10:52

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
----------------------------For the sake of clarity here's how you change 
OCUpload to make it work with the uploadprogress php / pecl extension 
If you're using the minimized version download and use the developers version 
so you can make changes.
Find this line - should be around line 215, but depends on version I'm sure:
/** add additional paramters before sending */
a couple lines later:
form.append($(
replace this with
form.prepend($(

This will put all parameters before the file parameter - which is required by 
the plugin.
Also, when you do this the order of your auto-generated form elements are 
reversed (because it prepends one at a time, putting the last element on top). 
This shouldn't matter 99% of the time ;)----------------------

Original comment by penguink...@gmail.com on 10 Aug 2011 at 5:06