Giter Site home page Giter Site logo

Comments (5)

markevans avatar markevans commented on July 19, 2024

it was indeed, but I haven't got round to adding in deprecation warnings etc.
it's not been released as a gem so don't expect master to necessary be 100% stable - it's better to use a gem version.
The new way is in the configure block:
c.url_format = '/media/:job/:basename.:format'
etc.

from dragonfly.

slbug avatar slbug commented on July 19, 2024

thanks for response. i've tried it

initializer:

require 'dragonfly'

app = Dragonfly[:images]
app.configure_with(:imagemagick)
app.configure_with(:rails)
app.define_macro(ActiveRecord::Base, :image_accessor)

app.configure do |c|
  c.url_format = "/images/:job/:basename.:format"
end

but nothing changed. it's still /media/:job

from dragonfly.

markevans avatar markevans commented on July 19, 2024

you also need to have the name available, so give the model a xxxxx_name column (string), where xxxxxx is the image attribute

from dragonfly.

slbug avatar slbug commented on July 19, 2024

Thanks. It's helped with basename and format, but prefix still /media/ instead of /images/

from dragonfly.

markevans avatar markevans commented on July 19, 2024

try c.server.url_format = '....
I need to fix the way the config works

from dragonfly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.