1. 17 Jan, 2018 1 commit
    • Micaël Bergeron's avatar
      Refactor the uploaders · 594e6a0a
      Micaël Bergeron authored
      I've demoted the ObjectStoreUploader to a concern that is mixed in
      the concrete uploader classes that need to store files in a remote
      object store.
      
      I've been working on making the local -> remote migration working
      first, which has been trivial compared to the remote -> local one.
      
      The current implementation is heavily based on side-effects which
      makes the code brittle and hard to reason about.
      
      The current approach is to store the `store` field in the correct
      `Upload` model once a migration has been done. To retrieve the field
      I use the `has_many :uploads` relationship, with all the paths that
      a certain file may have `uploads.where(path: paths).last`. This as
      the drawback of adding a database query for every upload lookup, but
      I feel that the generalization of this behavior is worth it. We should
      be able to optimize this down the road quite easily.
      594e6a0a
  2. 11 Dec, 2017 3 commits
  3. 09 Dec, 2017 4 commits
  4. 08 Dec, 2017 21 commits
  5. 07 Dec, 2017 11 commits