Commit Graph

17 Commits

Author SHA1 Message Date
ef1a9ce3b1
[ImageEncoder] Handle VIPS unsupported image type 2021-09-14 13:13:27 +01:00
d076781c74
[AttachmentToNote][Attachment] Add title getter to Attachment 2021-09-14 13:13:26 +01:00
3f61537140
[ENTITY] Split Attachment in various new entities
Remove Attachment Scope
Fixed some minor bugs

Scope will be implemented later in v3. It doesn't make sense to have
the scope handling being per attachment. Different actors can post
the same attachment with different scopes. The attachment controller
will assume the highest level of scope applied to the attachment and
the rest will be handled at the note level.

Motivation:
* Remove title from attachment, as it's part of the relation between attachment and note.
* Remove actor from attachment, many actors may publish the same attachment.
* Remove is_local from attachment,  as it's part of the relation between attachment and note.
* Remove remote_url from attachment, different urls can return the same attachment.

Addition:
* Attachment now has a lives attribute,  it's a reference counter with a nicer name
* GSActorToAttachment
* GSActorToRemoteURL
* RemoteURL
* RemoteURLToNote
* RemoteURLToAttachment
* AttachmentToNote now has a title attribute
2021-09-14 13:13:24 +01:00
77742c56c3
[ImageEncoder] Don't print_r the exception as that leads to an OOM error 2021-09-14 13:13:18 +01:00
a5348f2427
[MEDIA][AttachmentThumbnail] Add mimetype to Entity 2021-09-14 13:13:04 +01:00
41dcef3c7b
[Media] EncoderPlugins should handle the views that concern them
Ensure the intended filetypes and mimetypes during Vips conversions (part 2)
Sanitize Attachments instead of Validate (part 2)
Various bug fixes
2021-09-14 13:13:04 +01:00
c8cf8c3f13
[FILE][TemporaryFile] Fix various issues now that we also have Symfony's file abstractions 2021-09-14 13:13:03 +01:00
2b83a4b627
[UTILS][TemporaryFile] Change way TemporaryFile takes arguments and it's internal implementation 2021-09-14 13:12:58 +01:00
4fcccb1d1c
[CORE][ImageEncoder] Add width and height back in attachment entity and allow for differently sized thumbs
The strategy adopted involves predicting the thumb size as we did in v2 before having vips resize
2021-09-14 13:12:56 +01:00
5067bcd074
[ImageEncoder][FileQuota] Move quota enforcement to it's own plugin, so it can be easily shared and disabled 2021-09-14 13:12:55 +01:00
aad4bddedd
[ImageEncoder] Implement attachment validation for images. This limits the maximum dimensions of the file, enforces a per file, per user and per user-month size quota and fixes the title if it's a filename, by replacing the extension to the new one 2021-09-14 13:12:54 +01:00
30107de079
[Embed] Fix plugin. Only attempt to show an image, if we have one 2021-09-14 13:12:52 +01:00
7dab063a72
[PLUGINS] Remove scripts. These will need to be implemented with Commands 2021-09-14 13:12:48 +01:00
3afa872cec
[UI] Use thumbnail path for thumbs 2021-09-14 13:12:22 +01:00
e1995f44ce
[ATTACHMENTS] Move thumbnail controller to core and cleanup 2021-09-14 13:12:22 +01:00
3a7e92ed01
[ImageEncoder] Change preferred type to always be WEBP 2021-09-14 13:12:22 +01:00
e385a9ac29
[ATTACHMENTS] Even more further refactoring
Introduce Encoder plugins Instead of abstract upload and thumb modules

Ported attachment routes. In v3 thumbnail depends on existing attachment
so route updated accordingly.
2021-09-14 13:12:18 +01:00