XUpload - File Ordering and Naming

Message
Author
andrew
Posts: 13
Joined: Sep 23, 2006 10:26 pm

File Ordering and Naming

#1 Postby andrew » Jan 31, 2007 10:00 pm

I upgraded to Pro 2.4 on my test box this morning from 2.2. Everything has gone pretty well with this exception.

I have a static form submitting the upload with four file entries (file_1 > file_4) and four descriptions (pic_title_1 > pic_title_4)

For this test I uploaded
P1.jpg in file slot 1 with description P1,
P2.jpg in slot 2 with description P2
P3.jpg in slot 3 with description P3
P4.jpg in slot 4 with description P4

Code: Select all

    <tr>
	<td class="row1" height="28"><span class="gen">Photo Title:</span></td>
	<td class="row2"><input class="post" type="text" name="pic_title_1" size="60" /></td>
  </tr>
  <tr>
	<td class="row1"><span class="gen">Click "Browse" to select a photo from your PC:</span></td>

	<td class="row2"><input class="post" type="file" name="file_1"  size="49"></td>
  </tr>
  <tr><td class="row1" height="10" colspan="2"><hr></td></tr>
  <tr>
	<td class="row1" height="28"><span class="gen">Photo Title:</span></td>
	<td class="row2"><input class="post" type="text" name="pic_title_2" size="60" /></td>
  </tr>
  <tr>

	<td class="row1"><span class="gen">Click "Browse" to select a photo from your PC:</span></td>
	<td class="row2"><input class="post" type="file" name="file_2"  size="49"></td>
  </tr>
  <tr><td class="row1" height="10" colspan="2"><hr></td></tr>
  <tr>
	<td class="row1" height="28"><span class="gen">Photo Title:</span></td>
	<td class="row2"><input class="post" type="text" name="pic_title_3" size="60" /></td>
  </tr>

  <tr>
	<td class="row1"><span class="gen">Click "Browse" to select a photo from your PC:</span></td>
	<td class="row2"><input class="post" type="file" name="file_3"  size="49"></td>
  </tr>
  <tr><td class="row1" height="10" colspan="2"><hr></td></tr>
  <tr>
	<td class="row1" height="28"><span class="gen">Photo Title:</span></td>
	<td class="row2"><input class="post" type="text" name="pic_title_4" size="60" /></td>

  </tr>
  <tr>
	<td class="row1"><span class="gen">Click "Browse" to select a photo from your PC:</span></td>
	<td class="row2"><input class="post" type="file" name="file_4"  size="49"></td>
  </tr> 
However when I submit the form, the files upload correctly but the file names submitted to post.php are out of order:

Code: Select all

file_1 = P3.jpg
file_1_original = P3.jpg
file_1_status = OK
file_1_size = 3572
file_1_mime = image/jpeg
file_0 = P4.jpg
file_0_original = P4.jpg
file_0_status = OK
file_0_size = 4143
file_0_mime = image/jpeg
file_3 = P1.jpg
file_3_original = P1.jpg
file_3_status = OK
file_3_size = 3746
file_3_mime = image/jpeg
file_2 = P2.jpg
file_2_original = P2.jpg
file_2_status = OK
file_2_size = 3458
file_2_mime = image/jpeg
pic_title_1 = P1
pic_title_2 = P2
pic_title_3 = P3
pic_title_4 = P4 
This obviously makes it really hard to get the correct description with the right filename since the file_x part changes depending on what files I upload.

Hope all of this makes some sense. This was not an issue in 2.2 where the file name in the original script was submitted correctly to the redirect url.

Note turning on file descriptions and renaming the pic_title fields gets the file description field populated but the file descriptions again turn up with the wrong file names as follows:

Code: Select all

file_1 = P3.jpg
file_1_original = P3.jpg
file_1_status = OK
file_1_size = 3572
file_1_description = P1
file_1_mime = image/jpeg
file_0 = P4.jpg
file_0_original = P4.jpg
file_0_status = OK
file_0_size = 4143
file_0_description =
file_0_mime = image/jpeg
file_3 = P1.jpg
file_3_original = P1.jpg
file_3_status = OK
file_3_size = 3746
file_3_description = P3
file_3_mime = image/jpeg
file_2 = P2.jpg
file_2_original = P2.jpg
file_2_status = OK
file_2_size = 3458
file_2_description = P1
file_2_mime = image/jpeg 
Any help appreciated!

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

#2 Postby PilgrimX182 » Feb 01, 2007 7:26 am

Please PM me the link to your upload form. I think it's a bit non-standard cause it works fine on several tests for me.

andrew
Posts: 13
Joined: Sep 23, 2006 10:26 pm

#3 Postby andrew » Feb 01, 2007 2:25 pm

Thanks for the assistance... all is well now
PilgrimX182 wrote:Please PM me the link to your upload form. I think it's a bit non-standard cause it works fine on several tests for me.

danish
Posts: 1
Joined: Dec 12, 2009 9:07 pm

#4 Postby danish » Dec 12, 2009 9:28 pm

how is this resolved?