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
Comment #1
jdelaune commentedHmmm 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.
Comment #2
Anonymous (not verified) commentedThanks 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.
Comment #3
jdelaune commentedYou'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.
Comment #4
jdelaune commented