XUpload - 2 instancen in HTML a side

Message
Author
tfb
Posts: 1
Joined: Dec 13, 2006 12:23 pm

2 instancen in HTML a side

#1 Postby tfb » Dec 13, 2006 12:32 pm

Hallo.

I use the Pro and it is one of the best Scripts i know.

So, I would like to have 2 Uploadforms on one html.

Can you help.

---------------------------XUploadConfig.pm----------------------------------
modes =>
{
1 =>
{
# Directory for uploaded files (local path from root)
target_dir => '/home/httpdocs/temp',

# URL to send all input values from upload page
url_post => 'http://localhost/admin/eintrag.php',

# Max number of upload fields
max_upload_files => 1,

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

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

# Allowed file extensions delimited with '|'
# Use '.*' to allow all extensions
ext_allowed => 'jpg|jpeg',
},
2 =>
{
# Directory for uploaded files
target_dir => '/home/httpdocs/temp',

# URL to send all input values from upload page
url_post => 'http://localhost/admin/eintrag.php',

# Minimum total upload size in Kbytes
min_upload_size => 5,

# Max number of upload fields
max_upload_files => 1,

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

# Allowed file extensions delimited with '|'
# Use '.*' to allow all extensions
ext_allowed => 'pdf|xls|xlt|pps|ppt',
},
},
---------------------------XUploadConfig.pm----------------------------------

--------------------------------html-File----------------------------------------
<form name="F1Upload" enctype="multipart/form-data" action="/cgi-bin/upload/upload.cgi?upload_id=" method="post" onSubmit="return StartUpload(this);">
<input type="hidden" name="xmode" value="1">

<FIELDSET>
<LEGEND>Bild hochladen</LEGEND>
<table cellpadding=0 cellspacing=0 class="div1" id="div1">
<tr>
<td>
<div class="upload_input"><input id="my_file_element" type="file" name="file_1"></div>
<Table class="file_list">
<TR>

<TD nowrap>
<b>maximal <font id='x_max_files'>1</font> Dateien<font id='x_max_size'></font></b><br>
<div id="files_list" style="font: 12px Arial;"></div>
</TD>
</TR>
</Table>
<br>

<Input type="hidden" name="popup" id="popup"><label FOR="popup" ACCESSKEY="Z"></label><Input type="hidden" checked="checked" name="inline" id="inline"><label FOR="inline" ACCESSKEY="X"></label><Input type="hidden" name="inline2" id="inline2"><label FOR="inline2" ACCESSKEY="C"></label>
<br>
<center><input type="submit" value="Upload" class="myForm"></center>
<br>
</td>
</tr>
</table>
</FIELDSET>
<input type="hidden" name="css_name" value="hitech">
<input type="hidden" name="tmpl_name" value="hitech">
</form>
<iframe src="about:blank" name="upload" frameborder=0 style="width: 0px; height: 0px;z-index: 182;"></iframe>
<script>document.write('<script src="' + document.F1Upload.action+'&mode=settings' + '&xmode=' +document.F1Upload.xmode.value+ '" type="text/javascript"><\/script>');</script>
<script src="xupload.js"></script>



<form name="F2Upload" enctype="multipart/form-data" action="/cgi-bin/upload/upload.cgi?upload_id=" method="post" onSubmit="return StartUpload2(this);">
<input type="hidden" name="xmode" value="2">
<FIELDSET>
<LEGEND>Datei hochladen</LEGEND>
<table cellpadding=0 cellspacing=0 class="div1" id="div1">

<tr>
<td>
<div class="upload_input"><input id="my_file_element" type="file" name="file_1"></div>
<Table class="file_list">
<TR>
<TD nowrap>
<b>maximal <font id='x_max_files'>1</font> Dateien<font id='x_max_size'></font></b><br>

<div id="files_list" style="font: 12px Arial;"></div>
</TD>
</TR>
</Table>
<br>
<Input type="hidden" name="popup" id="popup"><label FOR="popup" ACCESSKEY="Z"></label><Input type="hidden" checked="checked" name="inline" id="inline"><label FOR="inline" ACCESSKEY="X"></label><Input type="hidden" name="inline2" id="inline2"><label FOR="inline2" ACCESSKEY="C"></label>
<br>
<center><input type="submit" value="Upload" class="myForm"></center>
<br>

</td>
</tr>
</table>
</FIELDSET>
<input type="hidden" name="datei" value="true">
<input type="hidden" name="css_name" value="hitech">
<input type="hidden" name="tmpl_name" value="hitech">
</form>
<script>document.write('<script src="' + document.F2Upload.action+'&mode=settings' + '&xmode=' +document.F2Upload.xmode.value+ '" type="text/javascript"><\/script>');</script>
<script src="xupload.js"></script>

--------------------------------html-File----------------------------------------

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

#2 Postby PilgrimX182 » Dec 14, 2006 6:40 am

You want them to be able to work simultaneously? This is not possible right now, cause only first statusbar updating.
The most easy solution is to put each upload form inside iframe.
I will think about this feature, but it's not easy to implement.