
dse at webonastick
Dec 2, 2011, 9:02 AM
Views: 1483
Permalink
|
|
Re: Use with Amazon CloudFront CDN (for images, PDFs, etc.)
[In reply to]
|
|
>> (A) Can versioning be accomplished by simply adding support for >> something like %{version} to output channel URL formats, or is it more >> complex than that? > > IIRC, it will work with any key listed in my_meths in the asset > class or any of its parents. > And yes, it looks like version is an option in Bric::Biz::Asset: > > https://github.com/bricoleurs/bricolage/blob/master/lib/Bric/Biz/Asset.pm#L548 > > There might be other issues, though; I'm not sure. I don't > think the URI will be recalculated in the database for every > new version, so finding existing media in the system by > their URIs might be tricky. I've done some deeper digging and it turns out the filename can't even part of the URI format for media. If you stick %{slug} in there, it gets ignored. The filename is appended outside of the _construct_uri function that does all the %{...} replacements. Any insight as to why this is the case? Looks like I'll have to do quite a bit of hacking and I don't want to break anything.
|