about summary refs log tree commit diff
path: root/spec/models/media_attachment_spec.rb
AgeCommit message (Collapse)Author
2023-02-20Autofix Rubocop RSpec/BeEq (#23740)Nick Schonning
2023-02-20Autofix Rubocop RSpec/LeadingSubject (#23670)Nick Schonning
2023-02-20Autofix Rubocop RSpec/ImplicitSubject (#23721)Nick Schonning
2023-02-19Autofix Rubocop Style/StringLiterals (#23695)Nick Schonning
2022-11-01Change max. thumbnail dimensions to 640x360px (360p) (#19619)Eugen Rochko
2022-03-26Fix edits with no actual changes being allowed (#17843)Eugen Rochko
* 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
2021-10-13Fix error when rendering public pages with media attachments (#16763)Claire
* Add tests * Fix error when rendering public pages with media attachments * Add tests * Fix tests * Please CodeClimate
2021-10-06Fix media attachment size validation not correctly accounting for file type ↵Claire
(#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-09-29Switch from unmaintained paperclip to kt-paperclip (#16724)Claire
* 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.
2020-01-23Fix media attachments without file being uploadable (#12562)Eugen Rochko
Fix #12554
2020-01-04Fix base64-encoded file uploads not being possible (#12748)Eugen Rochko
Fix #3804, Fix #5776
2019-11-04Fix remote media descriptions being cut off at 420 chars (#12262)ThibG
* Fix remote media descriptions being cut off at 420 chars Fixes #12258 * Fix tests
2018-10-04Lint pass (#8876)aus-social
2018-07-28Resize images by area instead of fixed dimensions (#8083)Eugen Rochko
To improve the way super tall or super ride images are treated, the numbers remain the same, 1280x1280 and 400x400, but if an image is less in one dimension than the other, the other can become larger Thanks to @WAHa_06x36@mastodon.social for the tip
2018-02-16Save video metadata and improve video OpenGraph tags (#6481)Eugen Rochko
* Save metadata from video attachments, put correct dimensions into OG tags * Add twitter:player for videos * Fix code style and test
2017-11-08Add tests for MediaAttachment (#5620)ysksn
- `#local?` - `#needs_redownload?` - `#to_param`
2017-10-26Fix Cocaine::ExitStatusError when upload small non-animated GIF (#5489)unarist
Looks like copied tempfile need to be flushed before further processing. This issue won't happen if the uploaded file has enough file size.
2017-09-29Increase attachment descriptions to 420 characters (#5139)Eugen Rochko
Blaze it
2017-09-28Add ability to specify alternative text for media attachments (#5123)Eugen Rochko
* Fix #117 - Add ability to specify alternative text for media attachments - POST /api/v1/media accepts `description` straight away - PUT /api/v1/media/:id to update `description` (only for unattached ones) - Serialized as `name` of Document object in ActivityPub - Uploads form adjusted for better performance and description input * Add tests * Change undo button blend mode to difference
2017-04-26Add media dimensions (#2448)Francis Chong
* Fixes #1985 - add migration AddMediaAttachmentMeta, which add meta field to media_attachments - before saving attachment, set file meta if needed - add meta in api * add spec * align the “size” format for image and video * fix code climate * fixes media_attachment_spec.rb
2017-04-19Fix #2108 - Fix gif uploads (#2171)Eugen
* Fix #2108 - Fix gif uploads Add specs for media attachment gifv conversion * Add ffmpeg to travis * Make travis install ffmpeg, not libav * Switch travis to trusty
2016-09-09Refactored generation of unique tags, URIs and object URLs into own classes,Eugen Rochko
as well as formatting of content
2016-09-05Add API to upload media attachmentsEugen Rochko