| View previous topic :: View next topic |
| Author |
Message |
andrew
Joined: 23 Sep 2006 Posts: 12
|
Posted: Jan 31, 2007 10:00 pm Post subject: File Ordering and Naming |
|
|
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: | <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: | 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: |
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! |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2109 Location: UFO Lab
|
Posted: Feb 01, 2007 7:26 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
andrew
Joined: 23 Sep 2006 Posts: 12
|
Posted: Feb 01, 2007 2:25 pm Post subject: |
|
|
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. |
|
|
| Back to top |
|
 |
danish
Joined: 12 Dec 2009 Posts: 1
|
Posted: Dec 12, 2009 9:28 pm Post subject: |
|
|
| how is this resolved? |
|
| Back to top |
|
 |
|