You can clone with
HTTPS or Subversion.
By default dragonfly urls don't end with an extension for the file they are representing e.g.:
This causes things like lightbox scripts to fail because they are looking for extensions.
A better URL is something like this:
We have managed to achieve this in Refinery CMS using this wee instance_eval:
It'd be nice to have core support for this, maybe as an option passed to the dragonfly configuration that puts the filename at the end by default. As it is, we have to get it using the job.steps where we look for one with step_name :fetch.
Hi - there is core support for this! :)
see 'suffix' bit of http://markevans.github.com/dragonfly/file.URLs.html
Ah excellent! Thanks Mark ;)
Hey Mark, I'm trying to get the original filename on the url too, to detect it in tests... But haven't managed to use the suffix proc example on the docs. What's the proper Rails 3 route that would go with that config?
hi - I'm currently working on making this easier as at the moment it's a bit tricky having the original filename available at the time that you generate the url.
In the meantime, the best way is probably to pass the name in each time as a suffix
image.url(:suffix => name)
where name has been saved on your model (you can just add the attachment_name column and it should just work) and then wrap this in a helper.
if you use Rails 3 routes you'd need to have all the necessary information in the url - what kind of thing are you using it for? is it standard image thumbnails for a model attachment?
yes, image thumbs for a model attachment, only accessed from an iphone app
adding attachment_name works well :) thanks
https://gist.github.com/880522 (tried embedding but it didn't render ?)
cool - hopefully when I've done with the refactoring you won't need the helper :)
Hi @markevans , any update on this feature?
Actually what I had more in mind is to get the absolute file path of a previously uploaded image