Active
Project:
Audio
Version:
5.x-0.3
Component:
audio_image
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Nov 2006 at 12:18 UTC
Updated:
7 Oct 2008 at 15:20 UTC
I have my audio module configured to store files outside the webroot for security purposes (and then I use private file delivery with filerequest.module to add to this).
This works fine for audio files.
However audio_image.module doesn't seem to cope with this.
it uploads and saves images fine, but then tries to display them by adding the path to the file from the server root to the website url so it looks like this:
http://www.example.com//path/to/audio/images/file.jpg
instead of just /path/to/audio/images/file.jpg
cheers
steve
Comments
Comment #1
aaron commentedalthough the image path is being displayed correctly for me in 5.x, it doesn't actually retrieve the image. audio files work fine. it's looking for something like /system/files/audio/images/11_other.jpg, which i can confirm by ftp is in the ../files directory, but returns page not found.
Comment #2
aaron commentedthe audio module handles its own uploading/downloading for audio files, but the audio_image module doesn't seem to. do we need to use hook_file_download to handle this for private filesystems? i don't really understand all this yet, so am not sure even where to begin.
Comment #3
drewish commentedno, it should work. Drupal handles the system/files menu items and should return the images correctly. can you provide a link i can look at?
Comment #4
aaron commentedsorry, i had to get things working, so i made the files public and altered the db tables accordingly. after the site launch next week, i'll change it back on the staging server and see if the problem pops back up, and i'll post it here to help troubleshoot. thanks
Comment #5
Chill35 commentedWhen using private download :
Drupal handles the download of 'system/files' files if they are recorded in the {files} table, and that will happen if files are uploaded using the upload core module.
Otherwise, if the files are put in the File System Path folder by other means (either ftp-ed or uploaded with a contributed module), another module, with {module_name}, has to return a header for the file, in response to a call to the {module_name}_file_download function, in order for the download to take place. In other words, a contributed module has to implement the hook function hook_file_download if files are not uploaded using the core upload module. As soon as the contrib module returns a header, the file is downloaded.
A coder's guide to file download in Drupal <--- a very handy 5-pages-long document on file download from a coder's perspective.
Comment #6
aaron commentedrather than hook_file_upload to return a header, would it be possible to bypass that when uploading the file to insert it into the {files} table manually and let the upload module take over from there, or will that cause bad ju-ju? i noticed in the files table that images uploaded by the imagefield module were inserted into that table. i don't remember if i saw audio image files in it off hand.
Comment #7
drewish commentedaaron, audio doesn't use the files table because it doesn't work properly with revisions.
Chill35, is there a version of that pdf that doesn't require a login?
Comment #8
Chill35 commentedComment #9
Chill35 commentedI really need some sleep. Sorry about the bad html.
Comment #10
Chill35 commentedComment #11
drewish commentedChill35, it's not that big a deal. I'll probably try to roll up a patch to add a menu hook to output private images that's parallel to audio_download or audio_play.
Comment #12
marlowx commentedok, looks like a couple more people are having this problem...
http://drupal.org/node/241605
http://drupal.org/node/318009
this sounds like something the audio plug-in should be accounting for automagically?
should i change my site to "public" downloads or whatever its called?
will that fix the album artwork path problem and create other problems with image galleries that i have already created? if i delete the newly broken image galleries then and then upload them again will everything then be fixed?
thanks guys!
Comment #13
marlowx commentedok, was just about to change my file thingy to public when i noticed this warning:
If you want any sort of access control on the downloading of files, this needs to be set to private. You can change this at any time, however all download URLs will change and there may be unexpected problems so it is not recommended.
---
does this mean i need to leave it at "private"
any advice appreciated... i need to fix this but i don't want to destroy something else in the process...
-=sigh=-
i can handle re-uploading the image galleries and simple yet tedious stuff like that... just worried about more technical and scary stuff that might go wrong that a newbie like me can't fix...