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.
| Attachment | Size |
|---|---|
| imagefield_crop-private_filesystem.patch | 3.74 KB |

#1
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
#3
#4
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
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
@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
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
@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
#10
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
Subscribing
#12
Subscribing
#13
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
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!