Closed (fixed)
Project:
Album Photos
Version:
6.x-2.0-2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2008 at 14:25 UTC
Updated:
30 Mar 2009 at 17:31 UTC
if the download method is set do privat album photos will not find the images.
new files are storen at the right place but thumbnail an images can not be desplayed .
the path is: http://localhost/../filestore/photos/t_108_0859_r2.jpg
but should be something like: http://localhost/system/files/photos/t_108_0859_r2.jpg
| Comment | File | Size | Author |
|---|---|---|---|
| photos.jpg | 7.41 KB | stoltoguzzi | |
| download.jpg | 27.52 KB | stoltoguzzi |
Comments
Comment #1
stoltoguzzi commentedI made some tests, then I modified the following function:
so file_create_url takes care about privat or public
this way it looks like ok? Could you check that?
Comment #2
eastcn commentedIt should not be checked, as will appear wrong.
In addition, photos.module will use an independent privacy controls.
thanks
Comment #3
stoltoguzzi commentedI think there is a missanderstanding, your modul can protect if a user can see a photo or not.
but if a user knows the url to this photo he can bypass your protection an download a photo using regular http request.
using private mode the files can be placed outside of the root-path an can only be downloaded using drupal.
and because this setting for private or global is set per side I think all modules should take care otherwise they can not be installed on installation using private mode.
here is a good description
http://11heavens.com/files-in-Drupal
your module is genial, I would like to use it but I need the private download for other reason and this setting is global:-(
Comment #4
eastcn commentedIs not the case, you can try photos.module the privacy controls: http://drupal.org/node/310151
Test, it unstable.
thanks
Comment #5
stoltoguzzi commentedI made a test:
- file system is set to public
- I am loged in as admin in IE
- I create some albums
- create a new user
- log in as this new user in firefox
- this has now access at all to any photos in the permission settings
- he can not see anything about albums that is ok
- know a copy an url from the admin IE to the new user in firefox an can see the photos without any problem
- if the files setting are set to privat this is not possible if the files-store is somewhere outside of the web-root.
Many drupal-sides will be switched to private download for this and other reason and because this is a system configuration your modul should support it.
Comment #6
eastcn commentedPerhaps you do not fully tested, photos_access can completely control the access images, the user will not know the image storage location.
1) the use of photos_access, users will never see images in the server's actual location.
You can test here, http://drupal.500959.com/photos/image/10, view the Password: 1234
When not authorized, you can not view images, only to see an image of the designated error.
2) Album will not support the private system settings.
3) System is set to private, through the url still be able to download the document.
Comment #7
stoltoguzzi commented"Album will not support the private system settings."
as I wrote sometimes there is a need to switch on this private settings for other reason/modules, an if this is switched on Album can not be used!
But I have my solution, thank you.
Comment #8
kassissieh commentedThe change stoltoguzzi recommended worked for me, though the original code has changed slightly.
I agree that this is necessary for sites that require the file system set to "private download method" and want this module to work. The reason is to protect the other files in the site -- it's not about the privacy of the photo files.
Comment #9
roball commentedI would suggest to forget the private download method at all and switch back to public. Then disable core's "Upload" module and use the "WebFM" module instead.