1. 23 Mar, 2016 1 commit
    • Add fog_options to configuration to be passed to fog #create · 65ef0d34
      We found that uploading large files to S3 would result in a socket error
      ("connection reset by peer") occasionally and lately much more
      consistently. In researching this I saw that many people got this error
      when uploading too large of a file without multipart chunking. I would
      have assumed fog did this automatically but the default chunk size may
      be too high. In order to address this I wanted to drop the chunk size to
      100MB.
      
      Rather than hard-code this I opted to expose a `fog_option`
      configuration option that lets me pass any additional options I want to
      the fog's `#create` call. This is similar to the `fog_attributes` option
      implemented in CarrierWave which [addresses the same
      problem](http://stackoverflow.com/a/11867978/201911).
      
      We've been running this now for a week in production and it seems to
      resolve the issue.
      
      https://github.com/thoughtbot/paperclip/pull/2135
      Jeremy Wadsack committed
  2. 15 Jan, 2016 1 commit
    • Skip calculating fingerprint when it is not used · 53a386c5
      The MD5 sum of an attachment is only necessary if the model has a corresponding
      _fingerprint column. If this column is absent, there is no need to calculate the
      MD5, which can be an expensive operation for large files.
      
      Accomplish this by deferring the fingerprint calculation using a block. If the
      _fingerprint column is absent, the block is never called, and the calculation
      is avoided.
      Matt Brictson committed
  3. 02 Jan, 2016 1 commit
  4. 22 Dec, 2015 1 commit
  5. 02 Dec, 2015 2 commits
  6. 21 Nov, 2015 1 commit
  7. 19 Nov, 2015 1 commit
  8. 15 Nov, 2015 7 commits
  9. 12 Nov, 2015 1 commit
  10. 10 Nov, 2015 1 commit
  11. 23 Oct, 2015 1 commit
  12. 09 Oct, 2015 1 commit
    • Output shorter but still useful error message · 8339e0fc
      Before the error message was sometimes millions of characters long.
      
      > [paperclip] Content Type Spoof: Filename a.csv
      > (application/octet-stream from Headers,
      > [#<MIME::Type::Columnar:0x007f9f90f89fa8
      > @container=#<MIME::Types:0x007f9f90b09d98 ... snip millions of
      > characters of output here ...>], @content_type="text/csv",
      > @raw_media_type="text", @raw_sub_type="csv", @simplified="text/csv",
      > @i18n_key="text.csv", @media_type="text", @sub_type="csv",
      > @extensions=["csv"]>] from Extension), content type discovered from
      > file command: application/zip. See documentation to allow this
      > combination.
      
      Now becomes:
      
      > [paperclip] Content Type Spoof: Filename a.csv
      > (application/octet-stream from Headers,
      > ["text/comma-separated-values", "text/csv"] from Extension), content
      > type discovered from file command: application/zip. See documentation
      > to allow this combination.
      
      [fixes #2017]
      Andy Hartford committed
  13. 10 Sep, 2015 2 commits
  14. 09 Sep, 2015 3 commits
  15. 01 Sep, 2015 4 commits
  16. 27 Aug, 2015 4 commits
  17. 24 Aug, 2015 1 commit
  18. 21 Aug, 2015 1 commit
  19. 20 Aug, 2015 5 commits
  20. 31 Jul, 2015 1 commit