Closed (fixed)
Project:
Image Picker
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Mar 2011 at 04:15 UTC
Updated:
19 Mar 2011 at 12:41 UTC
I wanted to use this module on a site where the download method is set to private, so here is a patch to provide that functionality. It's pretty simple -- fix imagepicker_get_files_directory() to do the right thing if the download method is private; use that function all the time instead of re-coding the logic; and implement the hook_file_download method.
The patch is against the 6.x-2.x-dev tar file from Feb 28 2010; the code in the git repository seems way out of date.
| Comment | File | Size | Author |
|---|---|---|---|
| imagepicker.patch | 8.13 KB | klflote |
Comments
Comment #1
hutch commentedThank you, I'll look this over today.
The latest dev was made from git, perhaps you need to set the branch with --branch 6.x-2.x
Comment #2
hutch commentedI applied the patch and tested things in a fresh install, setting the download method to 'private' before installing imagepicker and using a directory outside the doc root. It all works as expected, including the bulk import ;-)
I have commited this to 6.x-2.x and this will appear tomorrow in the dev tarball.
Thank you very much for this excellent addition to Imagepicker.
I have also applied this to the filepicker module.
Now to see if I can port it to D7....
Comment #3
klflote commentedCool; thanks for a great module.
Comment #4
hutch commentedI found a few problems with Page and Gallery modes, fixed now I think.
Comment #5
hutch commentedPrivate download method now also in D7 dev for imagepicker and filepicker modules