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.

CommentFileSizeAuthor
imagepicker.patch8.13 KBklflote

Comments

hutch’s picture

Thank 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

hutch’s picture

Status: Needs review » Fixed

I 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....

klflote’s picture

Cool; thanks for a great module.

hutch’s picture

I found a few problems with Page and Gallery modes, fixed now I think.

hutch’s picture

Private download method now also in D7 dev for imagepicker and filepicker modules

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.