[openstreetmap/openstreetmap-website] Switch user images to use Active Storage (#2296)

Tom Hughes notifications at github.com
Tue Jul 2 23:43:43 UTC 2019


This is a first draft for moving the user images to use Active Storage and is setup so that in production we can use an S3 backend for the storage.

New images are saved to Active Storage, and images from there are preferred, falling back to the old images if there isn't a suitable attachment.

Once this is merged and deployed we can use a background job to migrate the existing images and then remove the old paperclip based image support.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/2296

-- Commit Summary --

  * Add support for Active Storage attachments
  * Move user images to Active Storage with paperclip as a fallback

-- File Changes --

    M .gitignore (1)
    M .travis.yml (1)
    M Gemfile (3)
    M Gemfile.lock (2)
    M INSTALL.md (9)
    R app/assets/images/avatar_large.png (0)
    R app/assets/images/avatar_small.png (0)
    R app/assets/images/avatars.svg (0)
    M app/assets/javascripts/user.js (4)
    M app/controllers/users_controller.rb (8)
    M app/helpers/user_helper.rb (26)
    M app/mailers/notifier.rb (15)
    M app/models/user.rb (5)
    M app/views/api/users/_user.builder (2)
    M app/views/users/account.html.erb (30)
    M config/.gitignore (1)
    M config/environments/production.rb (2)
    A config/example.storage.yml (7)
    M config/initializers/config.rb (1)
    M config/settings.yml (2)
    D config/storage.yml (34)
    A db/migrate/20190702193519_create_active_storage_tables.rb (27)
    M db/structure.sql (128)
    M test/controllers/users_controller_test.rb (12)
    M test/helpers/user_helper_test.rb (12)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/2296.patch
https://github.com/openstreetmap/openstreetmap-website/pull/2296.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2296
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190702/ef89237c/attachment.html>


More information about the rails-dev mailing list