Code Monkey home page Code Monkey logo

Comments (12)

lanej0 avatar lanej0 commented on August 12, 2024 3

I've found that it's pretty easy to adapt. spectre uses the Dragonfly gem for file storage, and there's an S3 variant. So all you need to do is:

Add:

gem 'dragonfly-s3_data_store'

To your Gemfile, bundle install and then tweak config/inializers/dragonfly.rb to include:

require 'dragonfly/s3_data_store'

at the top and

datastore :s3,
  bucket_name: 'YOUR-S3-BUCKET',
  access_key_id: 'YOUR_ACCESS_KEY',
  secret_access_key: 'YOUR_SECRET_ACCESS_KEY'

under the Dragonfly.app.configure do section. Just like magic, Heroku works well!

from spectre.

Firefishy avatar Firefishy commented on August 12, 2024 1

Alternatively possibly the paperclip gem could be used. Paperclip supports many different cloud storage options.

from spectre.

lanej0 avatar lanej0 commented on August 12, 2024 1

@calaway Thanks -- it's my first time contributing. I've opened a PR (above) -- hope it helps folks.

from spectre.

Firefishy avatar Firefishy commented on August 12, 2024

Any chance you can PR this change?

from spectre.

lanej0 avatar lanej0 commented on August 12, 2024

@Firefishy I've got it all ready to go locally. Add me in so I can publish the branch?

from spectre.

lanej0 avatar lanej0 commented on August 12, 2024

I've still got the the pull request ready to go, but I don't have permission to publish it to GitHub. I'm happy to share it, just let me know

@Firefishy

from spectre.

cameronbraid avatar cameronbraid commented on August 12, 2024

Supporting S3 out of the box would be a great feature

from spectre.

cameronbraid avatar cameronbraid commented on August 12, 2024

I implemeneted a version that uses S3 for storage, which also works with non AWS S3, such as IBM Cloud S3, and minio

cameronbraid@2237bed

However , it doesn't fully store everything in S3 due to the way thumbnails are implemented - they are stored in the system/dragonfly/#{Rails.env}/thumbnails folder. So to fully support S3 the thumbnails need to be migrated to use the dragonfly api as well.

from spectre.

cameronbraid avatar cameronbraid commented on August 12, 2024

I'm not a ruby programmer, however from my research it looks like a dragonfly upfront processor could be used to do the thumbnails http://markevans.github.io/dragonfly/models#up-front

from spectre.

cameronbraid avatar cameronbraid commented on August 12, 2024

I implement thumbnails using dragonfly cameronbraid@4496c70

from spectre.

calaway avatar calaway commented on August 12, 2024

@lanej0, instead of having the maintainer give you write access to this repo, you can fork it and submit a PR from your fork back to the original. This is a typical pattern for open source contributions.

I need the same thing, so it would be great to see your solution. Thank you, sir.

from spectre.

fionnbharra avatar fionnbharra commented on August 12, 2024

@lanej0 @calaway I've merged that PR, so closing this issue. Will reopen if people have trouble getting s3 integration working.

from spectre.

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.