As spoken to you in the IRC iam currently implementing a new private file API which should be generally working with any kind of files uploaded with the file api. Acually as imagecache is accessing those files on the file-system base, no callbacks can be used here to stop it, when access is not granted.
Similar to the current private file implementation in imagecache, i added a hook_alter for even modifing that prefix. This way other module can force imagecache to use there callback to render the file, where they can use access checks for stoping imagecache if needed.
Patch attached, thanks for your time drewish
Comments
Comment #1
eugenmayer commentedThe real implementation of this API to add imagecache support in my file api in a submodule looks like this: http://pastebin.com/kg4ETV3z
The imagecache related part starts on #41
Comment #2
eugenmayer commentedFixed docs example
Comment #3
eugenmayer commentedAh sorry, me was wrong. The patch does not include the absolute path url fix, but it will conflice with it. nevertheless it should be easy to resolve
Comment #4
eugenmayer commentedMerge conflict would be on
Just use the line of this patch so it looks like above, the patch for the $base is included one line above.
Comment #5
eugenmayer commentedComment #6
marcoka commentedi suggest to give $presetname in drupal_alter too. You could then check an array of protected presets and create only the protected ones in /privatefiles
drupal_alter('imagecache_prefixpath', $prefix_path, $filepath, $presetname, $absolute);
Comment #7
YK85 commentedsubscribing
Comment #8
drewish commentedI think equivalent behavior can be achieved by using #570132: Support CDN rewriting of ImageCache paths. I'm going to take that approach because it's compatible with what D7 does and PressFlow is doing in D6.