instead they wind up linked with both the url of drupal installation "and" the absolute file path to the private folder.

Comments

vm’s picture

the url winds up looking like with private file system setting.

http://www.mysite.com/subdirectory//home/username/files_demo/audio/image...

the // is included in the url, I cannot remove it from file system settings, and use home/username/files_demo , as when I try, Drupal no longer finds the folder that is above the public folder.

drewish’s picture

Status: Active » Postponed (maintainer needs more info)

i was testing trying to replicate your bug but it seemed to work fine. perhaps you could provide the specific path to you drupal directory and to your private files directory.

vm’s picture

I will poke around more with this, this afternoon (EST) and report back some time this evening. I will start with a new install to see if I can isolate this a bit more. Thanks for taking a look Drewish.

vm’s picture

still plugging away at why I can't seem to accomplish this. Set up a fresh installation , setup private files system location above public root. uploaded a new audio file uisng the create content -> audio.

file and images are definetly saved to the proper private directory however I cannot seem to get album images to show under private file transfer.

the images consistently append the private location to the end of the url. I would be happy to give you admin username and password if necessary. I'm running out of ways to test.

vm’s picture

for demonstration purposes, I set up a demo subdomain. demo.mysite.com where drupal 4.7 and drupal 5 area located in subdirectories.

my url is demo.verymisunderstood.com/drupal47
the location of my private folder is /home/username/demo_files

this folder is stored one level up from the public root.

vm’s picture

uploaded an user picture to see how links are built. user pictures are properly uplaoded to the private folder and links looks like this. demo.verymisunderstood.com/drupal47/system/files/avatars/picture-1.gif

I cannot figure out why the audio module does not add the /system/. Still plugging away.

vm’s picture

Thought maybe the problem was with album art already embedded in the audio file.

So i deleted the image using the edit form. than uploaded a new image via the same form and still wind up without the /system/.

drewish’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new977 bytes

okay, try out this patch and let me know how it works. the best would be if you could apply it to your test site so i can view it there if it's not working.

vm’s picture

existing nodes showed no change. I uploaded a new audio file which also produced no change.

pacth was added to the demo site.

vm’s picture

added access for anon users to create & edit in a case that it may be useful.

drewish’s picture

it looks like it won't be a quick fix. i need to add a menu call back to display the images.

astroboy’s picture

I'm having the exact same problem on a 4.7.5 install, shared hosting.

audio module generates the cover from the embedded artwork correctly,
leaves file above web root, and drupal proxies it correctly, but the artwork image path is simply appended, without drupal proxy.

Here is my filesystem layout:

/home.10.6/myhosting/
/home.10.6/myhosting/drupal_files/ <-- Drupal Private Folder
/home.10.6/myhosting/drupal_files/audio/mp3File.mp3 <-- mp3
/home.10.6/myhosting/drupal_files/audio/images/mp3Artwork.jpg <--extracted audio file
/home.10.6/myhosting/www <--- Web root
/home.10.6/myhosting/www/absolute <--- Drupal Root

and The audio node gives me a playing mp3, but the image has the following url :
http://www.example.com/absolute//home.10.6/myhosting/drupal_files/audio/...

Seems the path translation of the image is definitely not taking place.

drewish’s picture

Status: Needs review » Active

if you've got private files, theres no way for the translation to work. looking through core, several things disable themselves if you're using private files (color and css caching). i'll do some more looking around but i'm tempted to just disable audio images if private files are enabled.

drewish’s picture

Status: Active » Needs review
StatusFileSize
new1.42 KB

okay guys, here's a very simple patch. i'm hoping it'll do what you need it to do.

drewish’s picture

i should note that that that patch was for HEAD/5.0, it might apply cleanly to 4.7 though

drewish’s picture

Status: Needs review » Active

well i committed that change to both 4.7 and HEAD. even if it doesn't fix it, it's the right way to do it. please grab a copy from CVS and give it a test.

drewish’s picture

Status: Active » Fixed

since there's been no feed back i'm going to assume it's fixed.

fraew’s picture

actually this (probably) broke the module for me - well i say probably as i've just installed it for the first time. i'm using a relative path in my files folder (i.e. files/downloads) and the image in the node view displays the path as http://mydomain.com/system/files/audio/images/front.jpg - the 'system/' bit completely unnecessary. thankfully using the old version of this line in the patch in the theme works ok for my setup:

return 'Only local images are allowed.';

vm’s picture

Status: Fixed » Needs work

so it broke it in reverse now. Going to move this back to active for drewish so he knows.

drewish’s picture

Status: Needs work » Postponed (maintainer needs more info)

fraew, the system part is because you're using private file transfers. it gets inserted into the URLs so that the system module can serve up the files instead of using the webserver's default. you need to provide more information on your files setup.