Closed (won't fix)
Project:
ImageField (and Image) Archive
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2010 at 14:02 UTC
Updated:
11 Mar 2011 at 15:52 UTC
Great module, appeared just two days before I needed it :) I have a slightly different use case, I needed a download link per node to download all images in a zip file. So I added three functions to do that. It only downloads the originals, and has no settings, but maybe someone will find it useful.
| Comment | File | Size | Author |
|---|---|---|---|
| image-download.patch | 1.45 KB | drifter |
Comments
Comment #1
infojunkieThanks for the patch. I agree that this is a needed piece of functionality, but your solution is too specific as far as I'm concerned. Please take a look at Actions REST for a more generic solution.
Comment #2
sansui commentedThis looks really awesome - thanks drifter, I'm going to try this out today and see if I can get it working. It's a feature I've been looking for
Looking at the patch, how did you set up your imagefield actions to create the zip? Do you think it would be fairly easy to modify to use with swfupload widget instead of imagefield specifically? (swfupload is bulk image uploader)
Comment #3
sansui commentedI was able to modify the code using drifter's patch (had to remove some of the conditions for image module etc, since I'm not using image nodes, just imagefields).
Only problem I've noticed, when not trying to go through the imagecache derivative creation stuff... the zip file comes back with a phantom folder/file in the zip file. So my zip file structure looks like:
sites
-default
--files (this one is a folder)
--files (this one looks like a file with no extension, and can't be extracted)
---jpeg1
---jpeg2
---jpeg3
So in function imagefield_archive_action when the code uses
instead of
I end up with the phantom file/folder, which causes issues on extraction. When I set it to use an imagecache preset, I get a php/imagecache error, but there is no more phantom file/folder.
I don't know too much about php zip, but thought I'd see if you had any ideas about this, Drifter
Comment #4
sansui commentedAh, I never followed up on this, but for anyone else with a similar problem it was an easy fix to just remove the call to imagecache_build_derivative.
And to remove the folder structure, simply change this line
$pathname = token_replace_multiple($context['settings']['filename'], array('global' => NULL, 'imagefield_archive' => $file, 'node' => $file->node));to :
$pathname = $file->filename;Using drifter's patch as a base and some additional simple modifications, this module has been very useful for packaging up a node's images and providing a link for each.