Needs review
Project:
Plupload integration
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2011 at 10:26 UTC
Updated:
15 Feb 2012 at 12:52 UTC
When I create a Node Gallery using the plupload integration, all gallery image nodes get created in the reverse order of the original list I drop onto plupload.
It is a pain to re-order all images nodes in the gallery afterwards.
It the any way to force the nodes to be created in the order specified in the upload list?
Thank you
Comments
Comment #1
thatjustin commented+1
Comment #2
thatjustin commentedHere is how you can have plupload upload your images in reverse order. Plupload uploads the first one in the queue first, which will be the NG image that is created first. Which will make its default sort order last. Which totally makes sense, and, unfortunately not what some (most?) of us want.
This is what I did. I had to edit plupload.js and the one that you get by default is minified. The non-minified plupload.js is distributed in the src/ directory of plupload. The source is are also distributed in the dev downloads listed here.
So, get the non-minified plupload.js and replace your plupload.js in /libraries/plupload/ and edit it so that you are swapping
for (i = 0; i < files.length; i++) {with
for (i = (files.length - 1); i >= 0 ; i-- ){If someone wants to, they could fork plupload and post the minified version. That would be peachy keen.
Comment #3
marktheshark commentedI ended up reverse sorting my selection, then drag'n'dropping it on plupload.
Thanks for the suggestion above.