Private file system can't see crop_display.jpg image.

silid - April 4, 2009 - 14:16
Project:Imagefield Crop
Version:6.x-1.0-beta3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

I have attached a patch that will enable users with private file systems to be able to see the images for cropping.

The code is based on that from the imagefield module directly.

AttachmentSize
imagefield_crop-private_filesystem.patch3.74 KB

#1

yhager - April 6, 2009 - 12:57
Status:needs review» needs work

Something is strange with that diff - it deletes the whole files and builds it from scratch.
Can you fix your diff program and reroll, it's very hard to see what you've changed.

#2

doq - April 6, 2009 - 14:31

#3

doq - April 6, 2009 - 14:32
Assigned to:Anonymous» doq

#4

yhager - April 7, 2009 - 06:45

First, receiveing patches is every maintainer's dream - so thank you very much for the patch.

As for the content, here are my comments:

1) I assume you would want to invoke only filefield_hook_download, and not ones made by other modules
2) by not sending the .crop_display.jpg file, we are losing the 'save original image' feature, so after you crop, you will get the cropped image on edit, and not the original. I think we should find a way to make all access checks in the same way filefield does, but send the .crop_display.jpg file at the end. Maybe a patch to filefield that will separate access checks with file's data will be appropriate here.

#5

magoo - April 27, 2009 - 12:35

This limitation must be specified in the module presentation page.

I had to migrate to private file system in order to control access to attachments and sadly this module stopped working.

It would be nice to see this COOL module work on private file systems in a near future.

#6

yhager - April 27, 2009 - 13:16

@magoo: thanks, I update the module's page with this regard. Can you try the patch in this thread? it needs work, but it might be a quick solution for you, until we deploy it properly.

#7

magoo - April 27, 2009 - 13:35

I installed the patch adding the hook_file_download implementation.

At least the image is now reachable from the browser.

This will make it temporarily. Sadly I see that I have another issue which is the crop on multiple images: all images are cropped with the same setup :-( - I think I've seen that in the issue list.

#8

yhager - April 27, 2009 - 13:41

@magoo: it's unfortunate that you have hit two limitations of this module. There is a patch for the second issue (see on the main module page), but it is still in the works.

This is the nature of open source development...

#9

doq - April 27, 2009 - 13:54
Assigned to:doq» Anonymous

#10

arhak - May 4, 2009 - 19:48

maybe trying join forces might help #181003: private download method and dynamically generated CSS and JS

[edit] saving you some time go directly to comment #24

#11

kingofkolt - May 27, 2009 - 23:46

Subscribing

#12

agerson - May 28, 2009 - 23:31

Subscribing

#13

imp7 - June 25, 2009 - 13:02

I am interested in any progress, this patch #2 doesn't seem to allow new images after the user clicks remove and uploads a new one.

#14

geerlingguy - September 23, 2009 - 14:21

Patch in #2 works for me - I was unable to see the preview using a private file system, and now the preview appears correctly.

Luckily, I only need Imagefield Crop on one image per node, so this is a godsend! Thanks!

 
 

Drupal is a registered trademark of Dries Buytaert.