I don't want change the order of images, because it is the order of a magazine.
Original filename order,
page.jpg, page_0.jpg, page_1.jpg, page_2.jpg, page_3.jpg, page_4.jpg
If users remove and reupload the first image (page.jpg),
the order will be changed like this,
page.jpg(page_4.jpg), page_0.jpg(page.jpg), page_1.jpg(page_0.jpg), page_2.jpg(page_1.jpg), page_3.jpg(page_2.jpg), page_4.jpg(page_3.jpg), page_5.jpg(reuploaded image)
Anyone has the same problem with multiple images?
Comments
Comment #1
davepoon commentedJust forgot to mention, thumbnail imagecache has a similar problem, too.
The difference is, it will not add the new image to the end, just change the order of the existing images.
Original filename order,
page.jpg, page_0.jpg, page_1.jpg, page_2.jpg, page_3.jpg, page_4.jpg
If users remove and reupload the first image (page.jpg),
the order will be changed like this,
page.jpg(page_4.jpg), page_0.jpg(page.jpg), page_1.jpg(page_0.jpg), page_2.jpg(page_1.jpg), page_3.jpg(page_2.jpg), page_4.jpg(page_3.jpg)
Comment #2
markDrupal commentedYeah, I see the file ordering is not 100% correct. I'll take a look at this.
Comment #3
markDrupal commentedI think your running into this issue because you add on "_0" to your file name and this is the same behavior as Drupal's file API when it encounters a file with the same name.
In the meantime, If possible, I would suggest you alter your naming convention, although I may be able to fix this. I'll take a look.
The Regex used that is changing your filenames is.
Any suggestions are welcome.
Comment #4
markDrupal commentedI believe this is fixed in version 1.2, please reopen if still having issues.
Comment #5
davepoon commentedThank you so much, I will give it a try,
and thank you for creating this excellent module!