Comments (3)
hi - I'd be reluctant to change anything with the model.image_url=
method as this is just a convenience method that will get complicated if adding extra stuff. The place to do it would be in fetch_url
. You could do
photo.image = Dragonfly.app.fetch_url("https://www.goo...", headers: {"Authorization"=> "Bearer <TOKEN>"})
The only thing missing that isn't currently implemented is the second arg with headers: {...
in FetchUrl
, but it would be fairly easy to add.
from dragonfly.
Thanks @markevans, that makes a lot of sense. I've created a PR for this. Fairly simple. Let me know if there's anything to fix :)
from dragonfly.
I've tested this approach in my app now and it works well.
from dragonfly.
Related Issues (20)
- Default content auto-whitelist doesn't work with FileDataStore
- Can't store resized pdf as jpg HOT 5
- Requesting filename without download file for custom stores HOT 2
- Turning Off Logs HOT 1
- Dragonfly unit test cases failing in Rails 4 HOT 1
- Dragonfly::FileDataStore::UnableToFormUrl: you need to configure server_root for Dragonfly::FileDataStore in order to form urls
- How to ignore "Dragonfly::FileDataStore destroy error"?
- Fetching url in the background
- after_assign's copy_to doesn't fire when using retained_image HOT 1
- SSL verification mode option
- warning: loading in progress, circular require considered harmful HOT 1
- is this version of Dragonfly compatible ? HOT 4
- Support for posix-spawn? HOT 2
- Security Issue Report HOT 1
- Guidance on upgrading to 1.4.0 HOT 7
- validate problems?
- CSS style color raising InvalidParameter when using plain generator HOT 1
- Questions about GHSA-qrgf-jqqm-x7xv HOT 2
- Allowing quality and interlace params for imagemagick thumb processor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dragonfly.