Commit Graph
155 Commits
Author SHA1 Message Date
Claire c4ea89dfd9 Change media attachment limit to 10000 characters (#39306) 2026-06-08 14:03:56 +00:00
Claire cdf721a273 Fix remote statuses with large media descriptions being rejected (#39135) 2026-05-21 15:46:10 +00:00
Matt Jankowski 71e6e50846 Simplify media attachment lookup in show/player actions (#38565) 2026-04-07 09:58:37 +00:00
Claire d48470a1fc Change media description length limit for remote media attachments from 1500 to 10000 characters (#37921) 2026-03-23 10:32:41 +00:00
Nicholas La Roux 438602c488 Upgrade rubocop from v1.84.0 to v1.84.2, update config, and correct offences (#37795) 2026-02-17 14:56:46 +00:00
Daniel KingandDaniel King d5d57ac25a Add flag to preserve cached media on cleanup (#36200)
Co-authored-by: Daniel King <git@kin.gy>
2026-01-29 15:53:51 +00:00
Shugo Maeda 48fe679728 Separate remote thumbnails into cache/ directory (#36911) 2025-11-21 13:27:04 +00:00
Matt Jankowski 3146109b08 Add MediaAttachment.combined_media_file_size method (#35570) 2025-07-30 12:57:51 +00:00
Eugen Rochko 24d943fee0 Change media attachments in moderated posts to not be accessible (#34872) 2025-06-12 08:53:02 +00:00
Matt Jankowski c025824f98 Use config_for for cache buster values (#34851) 2025-05-30 11:54:25 +00:00
Claire 90f7b90223 Change passthrough video processing to emit moov atom at start of video (#34726) 2025-05-19 08:29:31 +00:00
Claire ef870007e9 Fix CacheBuster being queued for missing media attachments (#34253) 2025-03-24 08:58:15 +00:00
Claire e30001bc80 Fix incorrect URL being used when cache busting (#34189) 2025-03-17 16:40:28 +00:00
rinsuki 2d97215aad chore: Allow yuvj420p (full color range yuv420p) movies passthrough (#34098) 2025-03-14 09:30:14 +00:00
Claire 1712543c68 Revert "Support animated PNGs in media attachments (#28516)" (#33334) 2024-12-17 10:52:59 +00:00
Christian Schmidt a70ae28644 Support animated PNGs in media attachments (#28516) 2024-12-11 02:28:21 +00:00
Jeong Arm 95c11d365d Don't push to cache buster if attachment path is nil (#31414) 2024-08-14 08:57:42 +00:00
Claire 994ef16b72 Bust CDN cache on media deletion (#31353) 2024-08-09 12:48:34 +00:00
Wolfgang Fournès cfadb87077 Update enum syntax to use the new Rails 7.0 style (#29217) 2024-02-16 14:54:23 +00:00
Matt Jankowski 7a1f087659 Add created_before and updated_before scopes to MediaAttachment (#28869) 2024-01-24 10:32:54 +00:00
Matt Jankowski bb0efe16e6 Remove default_scope from MediaAttachment class (#28043) 2023-11-30 13:30:35 +00:00
Essem bd810391d6 Properly remove tIME chunk from PNG uploads (#27111) 2023-09-25 19:21:07 +02:00
Claire e4f5114aaf Fix obsolete cache key in status cache invalidation logic (#26934) 2023-09-15 19:52:28 +02:00
Colette Kerr 8a9d7aeb1e Change DCT method used for JPEG encoding to float (#26675) 2023-09-07 05:26:25 +02:00
Eugen Rochko 05093266e6 Fix some video encoding failing due to uneven dimensions (#26766) 2023-09-02 09:02:44 +02:00
Eugen Rochko ecd76fa413 Fix videos not playing in some browsers due to unsupported color space (#26745) 2023-08-31 17:21:06 +02:00
Eugen Rochko 01b87a1632 Change video compression parameters (#26631) 2023-08-28 19:40:08 +02:00
Christian Schmidt f2257069b2 Fix AVIF attachments (#26264) 2023-08-01 19:34:11 +02:00
Nick Schonning da3bd913ae Autofix Rubocop Style/HashSyntax (#23754) 2023-05-04 05:54:26 +02:00
Matt Jankowski 2c6c398c60 Fix Performance/CollectionLiteralInLoop cop (#24819) 2023-05-04 05:33:55 +02:00
Matt Jankowski b5c4b47746 Fix Rails/ActiveRecordCallbacksOrder cop (#24689) 2023-05-02 18:23:35 +02:00
Eugen Rochko 9bda933740 Change media upload limits and remove client-side resizing (#23726) 2023-03-25 10:00:03 +01:00
Nick Schonning 717683d1c3 Autofix Rubocop remaining Layout rules (#23679) 2023-02-20 06:58:28 +01:00
Nick Schonning 63e6353886 Autofix Rubocop Rails/EnumHash (#23737) 2023-02-20 05:00:36 +01:00
Claire 2644a28cb3 Change remote media files to be downloaded outside of transactions (#21796) 2022-12-15 18:09:48 +01:00
Skyler Hawthorne 5b2ff8d32d fix media uploads with ffmpeg 5 (#21191) 2022-11-25 16:20:47 +01:00
Eugen Rochko 5c826c408d Fix image type not being set after conversion for convertible image types (#20624) 2022-11-14 07:13:14 +01:00
Eugen Rochko 9bc0a6c861 Fix metadata scrubbing removing color profile from images (#20389) 2022-11-11 09:20:10 +01:00
txt-file 0f5e6dd02b Add support for AVIF uploads (#19647) 2022-11-01 22:08:41 +01:00
Eugen Rochko ae07cfb868 Add support for HEIC uploads (#19618) 2022-11-01 16:26:25 +01:00
Eugen Rochko 15bae3e0e4 Change post-processing to be deferred only for large media types (#19617) 2022-11-01 15:27:58 +01:00
Eugen Rochko d0ba77047e Change max. thumbnail dimensions to 640x360px (360p) (#19619) 2022-11-01 13:01:39 +01:00
Jeong Arm df27953f96 Support audio/vnd.wave (#18737)
See: https://datatracker.ietf.org/doc/html/rfc2361
And Misskey uses this mime type for wav file.
2022-06-28 19:49:35 +02:00
Alexander Ivanov 379a7a7ca7 Add support for webp uploads (#18506) 2022-05-27 20:06:40 +02:00
Eugen Rochko 71f2b95106 Fix edits with no actual changes being allowed (#17843)
* Fix edits with no actual changes being allowed locally

* Fix edits with no actual changes being allowed through ActivityPub

* Fix false positive changes caused by description processing in model

* Fix not recording poll expiration update

* Fix test

* Revert changes to ProcessStatusUpdateService

* Various fixes and improvements

* Fix code style issues

* Various changes and improvements

* Add guard clause
2022-03-26 00:38:44 +01:00
Claire 166f6e4b50 Fix some media attachments being converted with too high framerates (#17619)
Video files with variable framerates are converted to constant framerate videos
and the output framerate picked by ffmpeg is based on the original file's
container framerate (which can be different from the average framerate).

This means that an input video with variable framerate with about 30 frames per
second on average, but a maximum of 120 fps will be converted to a constant 120
fps file, which won't be processed by other Mastodon servers.

This commit changes it so that input files with VFR and a maximum framerate
above the framerate threshold are converted to VFR files with the maximum frame
rate enforced.
2022-02-22 17:11:22 +01:00
Eugen Rochko 63002cde03 Add editing for published statuses (#17320)
* Add editing for published statuses

* Fix change of multiple-choice boolean in poll not resetting votes

* Remove the ability to update existing media attachments for now
2022-02-10 00:15:30 +01:00
Claire 5159ba26e4 Fix error when rendering public pages with media attachments (#16763)
* Add tests

* Fix error when rendering public pages with media attachments

* Add tests

* Fix tests

* Please CodeClimate
2021-10-13 15:27:19 +02:00
Claire 84ceebe1c4 Fix media attachment size validation not correctly accounting for file type (#16819)
* Fix media attachment size validation not correctly accounting for file type

Fixes a regression introduced in #16724 caused by the fact that kt-paperclip
now correctly runs validations before processing, meaning that file size
verification could not rely on our before_post_processing hook.

Moved the `before_post_processing` hooks to `before_validate` to make sure
the media attachment type is set correctly before the file gets validated.

* Add tests
2021-10-06 14:49:32 +01:00
Claire fc3ae1343d Switch from unmaintained paperclip to kt-paperclip (#16724)
* Switch from unmaintained paperclip to kt-paperclip

* Drop some compatibility monkey-patches not required by kt-paperclip

* Drop media spoof check monkey-patching

It's broken with kt-paperclip and hopefully it won't be needed anymore

* Fix regression introduced by paperclip 6.1.0

* Do not rely on pathname to call FastImage

* Add test for ogg vorbis file with cover art

* Add audio/vorbis to the accepted content-types

This seems erroneous as this would be the content-type for a vorbis stream
without an ogg container, but that's what the `marcel` gem outputs, so…

* Restore missing for_as_default method

* Refactor Attachmentable concern and delay Paperclip's content-type spoof check

Check for content-type spoofing *after* setting the extension ourselves, this
fixes a regression with kt-paperclip's validations being more strict than
paperclip 6.0.0 and rejecting some Pleroma uploads because of unknown
extensions.

* Please CodeClimate

* Add audio/vorbis to the unreliable set

It doesn't correspond to a file format and thus has no extension associated.
2021-09-29 23:52:36 +02:00