Commit Graph

51 Commits (acc367fd14546fda24497954774311388059b23e)

Author SHA1 Message Date
mayaeh acc367fd14
Fix naming issue (#13551) 4 years ago
Eugen Rochko c3ca3801f2
Add separate cache directory for non-local uploads (#12821) 4 years ago
Eugen Rochko 49b2f7c0a2
Fix base64-encoded file uploads not being possible (#12748)
Fix #3804, Fix #5776
4 years ago
Eugen Rochko 17159625b3
Add `S3_OVERRIDE_PATH_STYLE` environment variable (#12594)
To support Exoscale
5 years ago
Eugen Rochko f3d232381d
Add `tootctl media remove-orphans` (#12568) 5 years ago
tateisu f1ef777d40 add S3_OPEN_TIMEOUT environment variable (#12459) 5 years ago
Eugen Rochko 354fdd317e
Fix attachment not being re-downloaded even if file is not stored (#12125)
Change the behaviour of remotable concern. Previously, it would skip
downloading an attachment if the stored remote URL is identical to
the new one. Now it would not be skipped if the attachment is not
actually currently stored by Paperclip.
5 years ago
Eugen Rochko 086fc7ed77
Fix S3 adapter retrying failing uploads with exponential backoff (#12085)
The default limit of 10 retries with exponential backoff meant
that if the S3 server was timing out, you would be stuck with it
for much, much longer than the 5 second read timeout we expect.

The uploading happens within a database transaction, which means
a failing S3 server could negatively affect database performance
5 years ago
Yamagishi Kazutoshi b02169f124 Cast multipart threshold to integer (#11944) 5 years ago
Yamagishi Kazutoshi 172eaeba3f Add config of multipart threshold for S3 (#11924) 5 years ago
Eugen Rochko 4699cf853c
Add timeouts for S3 (#9842) 5 years ago
Nolan Lawson f05eb67081 Enable immutable caching for S3 objects (#9722)
I also added "public" here, as I can't think of a good reason not to add it. Perhaps it has some marginal benefit in that ISPs (or other proxies) can cache it for all users. The assets are certainly publicly available and the same for all users.
5 years ago
M Somerville 2bba6e582d Rename S3_CLOUDFRONT_HOST to S3_ALIAS_HOST. (#8423)
Still check for S3_CLOUDFRONT_HOST for existing installs.
6 years ago
ThibG f06fa09962 Revert to using Paperclip's filesystem storage, and fix dangling records in remove_remote (#8339)
* Fix uncaching worker

* Revert to using Paperclip's filesystem backend instead of fog-local

fog-local has lots of concurrency issues, causing failure to delete files,
dangling file records, and spurious errors UncacheMediaWorker
6 years ago
Hugo Gameiro ea4e243303 Improve OpenStack v3 compatibility (#7392)
* Update paperclip.rb

* Update .env.production.sample

* Update paperclip.rb
6 years ago
Yamagishi Kazutoshi 28384c1771 Revert "Revert "Upgrade Paperclip to version 6.0.0" (#6807)" (#6808)
This reverts commit 40871caa4b.
6 years ago
Eugen Rochko 40871caa4b
Revert "Upgrade Paperclip to version 6.0.0" (#6807)
* Revert "Bump version to 2.3.2rc1"

This reverts commit cdf8b92fea.

* Revert "Downgrade Dockerfile to Ruby 2.4.3 on Alpine 3.6 (#6806)"

This reverts commit 0074cad44f.

* Revert "Handle Mastodon::HostValidationError when pulling remoteable assets (#6782)"

This reverts commit 4a0a19fe54.

* Revert "Correct the reference to user's password in mastodon:add_user task (#6800)"

This reverts commit 338bff8b93.

* Revert "Upgrade Paperclip to version 6.0.0 (#6754)"

This reverts commit b88fcd53f7.
6 years ago
Yamagishi Kazutoshi b88fcd53f7 Upgrade Paperclip to version 6.0.0 (#6754) 6 years ago
THE BOSS ♨ 17e26f8afe Fix typo in paperclip.rb (#5936) 7 years ago
Yamagishi Kazutoshi b0db4dad79 Revert fog-aws (ref #5604) (#5934) 7 years ago
MitarashiDango cbbeec05be Fix spell miss (SWIIFT_OBJECT_URL -> SWIFT_OBJECT_URL) (#5617) 7 years ago
Yamagishi Kazutoshi 47b0c61853 Unify file upload to using fog (#5604) 7 years ago
Jeong Arm 9d97054fe6 Remove timestamps on any option (#5282) 7 years ago
Nishi, Keisuke 83ffc4dc07 Fix Paperclip::Fog always responds Not Found in OpenStack-v2 like ConoHa (#5155) 7 years ago
Patrick Figel 3018043fc2 Add OpenStack Keystone V3 support (#4889)
Keystone V2 is deprecated in favour of V3. This adds the necessary
connection parameters for establishing a V3 connection. Connections
to V2 endpoints are still possible and the configuration should
remain compatible.

This also introduces a SWIFT_REGION variable for multi-region
OpenStack environments and a SWIFT_CACHE_TTL that controls how long
tokens and other meta-data is cached for. Caching tokens avoids
rate-limiting errors that would result in media uploads becoming
unavailable during high load or when using tasks like
media:remove_remote. fog-openstack only supports token caching for
V3 endpoints, so a recommendation for using V3 was added.
7 years ago
Adam Thurlow 6994664a13 swift-enable the paperclip! 📎 (#2322) 7 years ago
alpaca-tc ee3e0a93f4 Fixes unknown mime type (#2822) 7 years ago
Ash Furrow 66b39ccaed Removes timestamp from URLs. (#2185) 7 years ago
tmyt 6c83fec971 Make configuarable s3_permissions for paperclip (#2139) 7 years ago
Yamagishi Kazutoshi 8b8e140c71 Change to switch signature version for Amazon S3 (#2124) 7 years ago
Eugen e09ab2c0bd Fix #1642, fix #1912 - Dictate content-type file extension (#2078)
* Fix #1642, fix #1912 - Previous change (#1718) did not modify how original file was saved on upload

* Fix for when file is missing
7 years ago
Joachim Viide 363de2dffd Leave out the "Expires" header from S3 uploads (#1886) 7 years ago
Valentin Lorentz 5ab0ffc6c8 Custom Paperclip path. (#778)
* Custom Paperclip path.

* Document PAPERCLIP_ROOT.

* Add PAPERCLIP_ROOT_URL (and rename PAPERCLIP_ROOT to PAPERCLIP_ROOT_PATH).
7 years ago
Yusuke Abe 169c68a739 Add filename extension to paperclip (#1718) 7 years ago
leopku c46843c65c 🔧 S3 protocol from ENV
add support for reading S3 protocol from ENV
also add S3_HOSTNAME in .env.production.sample
7 years ago
Eugen Rochko ebc01bf0f6 Make the paperclip filename interpolator smarter about the :original style
If an :original gets converted into another format, it would get saved as
original_filename *anyway*, so generating the extension is pointless and
yields bad results for when you change the style definition later. This way,
old gifs will still have correct URLs
7 years ago
Effy Elden a097dd489b Change default S3 ACL string used by Paperclip from 'public' (which is invalid) to 'public-read' 7 years ago
Eugen Rochko 2e71bb031b Fix Paperclip timeout setting. Fix bug introduced in #437 7 years ago
Eugen Rochko 7ddec6e7c3 Add read timeout to paperclip when it's downloading remote images 7 years ago
Eugen Rochko 8b93f45f3d Fix paperclip config 8 years ago
Eugen Rochko f114bc7bb7 Update Paperclip config to allow plugging in Minio instead of AWS 8 years ago
Eugen Rochko b362de2232 Adding configurable e-mail blacklist 8 years ago
Eugen Rochko f763e844e8 Do not use expiring links after all 8 years ago
Eugen Rochko 80c44ed9c1 Do not autoplay videos, display play button instead. Use expiring links when using S3. Do not keep originals
for avatars/headers, resize avatars down to 120x120 instead of 300x300. Set cache headers on S3 stuff, also
make it private (aka only accessible via expiring links to prevent hotlinking)
8 years ago
Eugen Rochko 290ffb63cd Fix cloudfront config 8 years ago
Eugen Rochko d3bd10dfe4 Add Cloudfront support 8 years ago
Eugen Rochko 5973ca3d11 Upgrade Paperclip to 5, AWS-SDK to 2, do not generate medium/small versions of avatars 8 years ago
Eugen Rochko 2f21f4cc01 Fix region setting for AWS gem 8 years ago
Eugen Rochko b835f4aa1c Fix insecure S3 URLs 8 years ago
Eugen Rochko 45230c56ab Improve S3 config 8 years ago