XUpload - Additional fields in upload form

Message
Author
aapc
Posts: 1
Joined: Feb 22, 2007 5:59 pm

Additional fields in upload form

#1 Postby aapc » Feb 22, 2007 6:06 pm

Greetings,

First off, I'd like to say that this is an excellent tool and you have saved me hours of custom work. Thank you!

I am experiencing one small problem that I have narrowed down. I am integrating XUploadPro into a custom content management system and I need to add additional fields to the upload form. I have added several fields and I see that they are added to the post_url very nicely. However, when I add a hidden field with the name "action" it seems to cause a problem and the upload progress bar does not function. Is there something related to that variable name that could be causing a problem? Unfortunately, that variable is very important to my content management system and I'd have to rewrite some core code to change it.

Thanks for your help.

--Tony

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#2 Postby PilgrimX182 » Feb 26, 2007 1:31 pm

Interesting problem...spent 30 mins solving it :)
Here's quick hack: in upload_form.html replace

Code: Select all

document.F1Upload.action
with

Code: Select all

document.F1Upload.attributes['action'].value
ALSO in xupload.js replace

Code: Select all

f1.action
with

Code: Select all

f1.attributes['action'].value
in 3 places

This will work in IE,Opera,FF only not sured bout Safari