Thanks for a good module. I think it could be very useful to me but I've run into a snag and wanted to see if there is any way to get around it. I enabled Simple CDN along with the MP3 Player module and CCK FileField on a test site. When uploading my files are stored at "/sites/default/files/audio/". In my mirror settings I put in the url to the homepage of my site and added the mirror http://bucketname.s3.amazonaws.com. Once enabled the rewritten url is http://bucketname.s3.amazonaws.com/sites/default/files/audio/filename.mp3. But that's not the url to the file. The proper url to to the file is http://bucketname.s3.amazonaws.com/filename.mp3.

Is there are way to configure the module so that the rewritten url points to directly to the bucket address and does not add a path that duplicates the local directories on my site?

Comments

jdelaune’s picture

Hmmm try entering your main site URL as http://yoursite.com/sites/default/files/audio/ might work. If not it would be a small mod to the php to get it working in your instance.

Anonymous’s picture

Thanks for offering that up. I did try that and the mirror url remained the same. If you can provide me a clue as to the spot in the php where the change would be needed I would be most grateful.

jdelaune’s picture

You'll need to modify the simplecdn_rewrite_url function in the .module file.

It may just been adding the different domain to the front of the url, in which case you will have to do a str_ireplace() on the /sites/default/files/audio part.

jdelaune’s picture

Status: Active » Closed (fixed)