XUpload - Multiple Servers Upload

Message
Author
vzmind
Posts: 3
Joined: Apr 10, 2007 5:33 am

Multiple Servers Upload

#1 Postby vzmind » Jun 21, 2007 10:18 am

Hi,

I am using XUpload Pro 2.5. Everyting is working fine .... as long as the upload form and the perl cgi are on the same domain. Let me explain more precisely.

Imagine Server www.front.com is your front web server and www.files.com is your files server. You have the form on www.front.com but the action called by it is someting like www.files.com/xupload.cgi. When you load the page it's ok. But when you start upload every second (maybe less) a javascript error is throw (uncaught exception: Permission refusée d'obtenir la propriété HTMLDocument.getElementById) until the end of upload. The progress bar dont move at all. At the end of file transfert, the progress bar go directly to 100% and you are dropped to your post_url.

My interpretation is that the xupload.js located on www.front.com cannot communicate with the xupload.cgi located on www.files.com. That's a security limitation of javascript.

Have you an idea on how I can go through?

Many thanks in advance, I have spend so much time on google and this forum to find a solution without result.

Vz :shock:

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

#2 Postby PilgrimX182 » Jul 04, 2007 8:11 am

What upload mode do you use? Try pop-up or in-iframe modes.

vzmind
Posts: 3
Joined: Apr 10, 2007 5:33 am

#3 Postby vzmind » Jul 10, 2007 7:46 am

Hi Pilgrim,

thanks for your reply. The fact is that our customer has some technical constraints and dont want to use such tricks. So, we have thought to put an additionnal perl CGI on front.com. In that way, files.com will first communicate with front.com through PERL and then ONLY push data to a LOCAL JS. But honnestly, we havent your PERL talents and it's must be a huge work.

Following, here is a part of our configuration file with the upload mode variables. In<FORM>, our enctype is "multipart/form-data".

Do you agree that it's not possible with actual application architecture to upload on different domain?
Have you some other technical tricks (dif of PopUp or IFrame) to help us?

Best Regards and thanks again for this work.

# You can use different upload modes for different upload forms
# Specify upload mode in xmode hidden input in upload_form.html
modes =>
{
1 =>
{
# Directory for uploaded files
target_dir => '/usr/lib/cgi-bin/uploader/uploads',

# URL to send all input values from upload page
url_post => 'http://myserver.net:3001/uploader/create',

# Max number of upload fields
max_upload_files => 1,

# Minimum total upload size in Kbytes (leave empty or zero to disable)
min_upload_size => 0,

# Maximum total upload size in Kbytes
max_upload_size => 7000000,

# Allowed file extensions delimited with '|'
# Use '.*' to allow all extensions
video_ext_allowed => 'avi|mpg|wmv|3gp',
audio_ext_allowed => 'wma|wav|mp3',
picture_ext_allowed => 'jpg|gif|png',
ext_allowed => 'jpg|gif|png|mp3|wav|avi|wma|3gp|mpg|wmv',
},

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

#4 Postby PilgrimX182 » Jul 11, 2007 6:55 am

Erm....I guess you got me wrong. In upload form there are 4 radiobuttons, right. Each is progress bar mode. 1st is pop-up, 2nd and 3rd are iframe-in, 4th is on-page.
4th mode won't work with multiple domains, but 1,2,3 modes should work, at least they work for me with different domains(only Stop button doesn't work due to JS security).

vzmind
Posts: 3
Joined: Apr 10, 2007 5:33 am

#5 Postby vzmind » Jul 13, 2007 11:05 am

That was on-page.So ok, if there are no technical solutions let's move to popup option.
Many thanks for your involvment and your support. :D