CDN integration
| Project: | Audio |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Jump to:
The CDN module (http://drupal.org/project/cdn) would be a handy one for Audio to be compatible with. Its core patch has already been included in D7, so it seems to be the way things are moving as far as remotely hosting content. Audio currently does everything with files, not URLs, so moving all that can be tricky.
That being said, enclosed is a patch that works with the CDN module for 6. It does work, and I currently have it live in a production environment (basically because I had no choice). But it has some caveats:
1) getID3() won't work. It removed support for remote URLs a few versions ago. Its "fix" is to copy a file locally, operate on it, and move it back. Makes sense for writes; makes no sense for analyze(). But that's what they opted for, at least so far.
2) I haven't tested this, but I would bet money that it requires allow_url_fopen to be enabled. Should be enabled by default, IIRC, but the patch becomes much hairier if we have to end up curl-ing the data stream. This way the patch is small and easy to understand. All you need to do, basically, is use file_create_url() and let CDN do the rest.
| Attachment | Size |
|---|---|
| audio-cdn-r0.patch | 961 bytes |

#1
Some related discussion in the CDN issue queue: #544302: url_exists(), file-level remapping for CDN content