Entity Note: It doesn't make sense to handle attachments on Note::create.
Attachments exist out of Notes, they are a thing on their own.
Furthermore, they aren't always handled the same, they most definitely
aren't always uploaded files.
FileQuota: It doesn't make sense to check if a file is greater than max
allowed upload size here. The plugin ensures a user is inside his
allowed quota, it's ignorant to anything else. Whether a file respect
max upload is a core thing that must be handled directly in the Posting
component. TODO: The configuration regarding user and monthly quota
must become FileQuotaPlugin settings and be removed from core.
c90efe2c52 - [UI] Add mechanism for rendering note contents in different formats. Implement plaintext rendering. Use rendered field for note content, rather than the content itself
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
Currently, we simply hash the contents of the file with sha256, but in the future we can use something smarter,
which could find visual feature similarity between images
Some key points:
- Components and Plugins shouldn't extend Module directly
- Avatars should be fetched via GSActor ID, not by nickname as that isn't unique
- Avatar now is a separate Component
- Common file utilities are now to be placed in Core\GSFile, this will
handle storage and trigger validation
- Some bug fixes