horst Posted December 16, 2013 Share Posted December 16, 2013 Hi,I use the zipupload for images with the default unzip command, I think. $config->uploadUnzipCommand = '/usr/bin/unzip -j -qq -n /src/ -x __MACOSX .* -d /dst/'; And everything works fine. Zip is uploaded, images are unzipped and added to the imagesfield. Except the resulting sortorder in the imagesfield isn't fine. If I have images like 001.jpg, 002.jpg, 003.jpg, ... I want to have this order with my imagesfield, but the images gets stored unorderd. How can I get the images stored in (alpha) numeric order with zipupload? Link to comment Share on other sites More sharing options...
ryan Posted December 27, 2013 Share Posted December 27, 2013 I'm not really sure what affects the order that unzip extracts those files (or PHP reads them in), but we are just pulling them in, in the same order they come through on the file system. I'm actually planning to replace the uploadUnzipCommand with ZipArchive (using uploadUnzipComment only as a fallback), so maybe the issue will resolve itself there. But just wanted to mention that I don't think PW is involved in the ordering of these files. Link to comment Share on other sites More sharing options...
horst Posted December 27, 2013 Author Share Posted December 27, 2013 Hi Ryan, thanks for the reply. PW reads them in by the filesystem and that seams to use the created or lastmodified timestamp. When I start uploading 5 images with names 001.jpg - 005.jpg together per AJAX (or a ZIP with the same 5 images) as the result the sort order is uncontrolled. Some small images first and all together very un-ordered. Both upload variations, AJAX and ZIP, are actually not very customer friendly if she has the need to use the images name as sort order. If the PHP-UNZIP will be implemented that it allows a controlled unzip and pw-import file by file, it would be helpfull for that. Alternative: a (optionally) configurable sortorder (by name or unsorted/by time) for imagefields would be nice. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now