crowdcover/openstreetmap-website — pull request #3 by bryanjswift (2014-06-19 16:23:36+00:00)
Title: Modify how attachments are saved in static story

In order to make it easy to serve the uploaded attachments via apache/nginx/proxy or a CDN it must be easy to move the attachments files transparently to a different host and still have them be retrievable. By using the url provided by `StoryAttachment#image#url` instead of creating an attachment url based on the `StoryAttachment#id` the upload target of `StoryAttachment`, public/attachments, can be copied to a separate server and served via a caching proxy; provided the new `attachment_url` setting is changed and the `Story` instances are saved to regenerate files from the `story.md.erb`.