Commit graph

153 commits

Author SHA1 Message Date
KMY
94c2396a34 Merge remote-tracking branch 'parent/main' into upstream-20231204 2023-12-04 12:04:52 +09:00
Matt Jankowski
bb0efe16e6
Remove default_scope from MediaAttachment class (#28043) 2023-11-30 13:30:35 +00:00
KMY
78ddcb10c3 Merge remote-tracking branch 'parent/main' into kb_development 2023-09-27 21:33:12 +09:00
Essem
bd810391d6
Properly remove tIME chunk from PNG uploads (#27111) 2023-09-25 19:21:07 +02:00
KMY
a8419d83ba Merge remote-tracking branch 'parent/main' into kb_migration 2023-09-16 13:45:45 +09:00
Claire
e4f5114aaf
Fix obsolete cache key in status cache invalidation logic (#26934) 2023-09-15 19:52:28 +02:00
KMY
979292d950 Merge remote-tracking branch 'parent/main' into kb_migration 2023-09-10 16:17:34 +09:00
Colette Kerr
8a9d7aeb1e
Change DCT method used for JPEG encoding to float (#26675) 2023-09-07 05:26:25 +02:00
KMY
32cfd20257 Merge remote-tracking branch 'parent/main' into kb_migration 2023-09-03 10:55:46 +09:00
Eugen Rochko
05093266e6
Fix some video encoding failing due to uneven dimensions (#26766) 2023-09-02 09:02:44 +02:00
KMY
621a41b670 Merge remote-tracking branch 'parent/main' into kb_migration 2023-09-01 18:05:03 +09: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
KMY
05a022448b Merge remote-tracking branch 'parent/main' into kb_migration 2023-08-29 13:25:48 +09:00
Eugen Rochko
01b87a1632
Change video compression parameters (#26631) 2023-08-28 19:40:08 +02:00
KMY
82d61dad96 Merge commit '2f932cb2bb' into kb_migration 2023-08-03 15:48:07 +09:00
Christian Schmidt
f2257069b2
Fix AVIF attachments (#26264) 2023-08-01 19:34:11 +02:00
KMY
2a54b76823 Bump to media attachments max on poll (disabled now) 2023-05-12 15:47:40 +09:00
KMY
32f0e619f0 Merge commit 'f877aa9d70' into kb_migration 2023-05-07 14:50:12 +09: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
KMY
9b032185b8 Merge branch 'kb_development' into kb_migration 2023-04-25 10:32:16 +09:00
KMY
7e125b276f Remove extra media attachments and support raw array 2023-04-22 17:13:48 +09:00
KMY
3d53a47905 Merge remote-tracking branch 'origin/kb_development' into kb_migration 2023-04-07 21:45:07 +09:00
KMY
1502668ee5 Support 5 or more media_attachments from activitypub 2023-04-07 20:26:52 +09:00
KMY
76340285d6 Merge commit '34225d7199' into kb_migration 2023-03-27 14:06:56 +09:00
Eugen Rochko
9bda933740
Change media upload limits and remove client-side resizing (#23726) 2023-03-25 10:00:03 +01:00
KMY
87b9fd9624 Fix media attaches panel title 2023-02-28 15:33:20 +09:00
KMY
f930b9db47 Fix admin image manager design 2023-02-28 09:39:50 +09:00
KMY
bd839a8abc Add admin attachments panel 2023-02-28 09:16:47 +09: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
Claire
db57bff11d
Stop setting a shortcode to newly-created media attachments (#16730)
* Stop setting a shortcode to newly-created media attachments

The WebUI has stopped using the “short media URL” in ages. This isn't used
anywhere except for mail notifications.

Deprecating it would allow us to eventually get rid of at least a database
column and corruption-prone index, as well as a controller.

* Fix tests
2021-09-13 18:59:37 +02:00
Eugen Rochko
036556d350
Fix media processing getting stuck on too much stdin/stderr (#16136)
* Fix media processing getting stuck on too much stdin/stderr

See thoughtbot/terrapin#5

* Remove dependency on paperclip-av-transcoder gem

* Remove dependency on streamio-ffmpeg gem

* Disable stdin on ffmpeg process
2021-05-05 19:44:01 +02:00