Commit Graph

79 Commits

Author SHA1 Message Date
c381e58d33
[ENTITY] Refactor RemoteURL entities to Link
RemoteURL was being an awfully confusing term.
2021-08-14 17:04:51 +01:00
3019048585
[Posting] Re-add original file to attachment on upload, if it was previously removed 2021-08-14 17:00:52 +01:00
aec8521e4b
[ENTITY][Posting] Remove GSActorToRemoteURL, Fix URL database store 2021-08-14 17:00:49 +01:00
ae7516c893
[ATTACHMENTS] Always store in the same location 2021-08-14 17:00:48 +01:00
32ad5dbd74
[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-08-14 17:00:46 +01:00
420b3f4aeb
[DB][Attachments] Use count function rathar than fetch and count, rename to refCount, rather than countDepencies 2021-08-14 16:13:01 +01:00
9343d00110
[Avatar] Delete attachment only if safe 2021-08-14 16:12:47 +01:00
67f5421691
[ATTACHMENTS] Add dependencies counter 2021-08-05 14:44:05 +01:00
289eef5cf7
[Avatar] Store as regular attachments 2021-08-05 03:24:21 +01:00
5896f5bb82
[Avatar] Move entity from core to component 2021-08-05 03:23:05 +01:00
4297eb71a0
[CORE][GSFile] Change actor_id paramenter of validateAndStoreFileAsAttachment to optional and reorder them and their usages 2021-08-03 19:23:02 +00:00
efeb4b4ffe [SETTINGS][PLUGIN][CONTROLLER] Populate profile tabs event added. Settings base template populated with such event for plugins and components.
Signed-off-by: Eliseu Amaro <mail@eliseuama.ro>
2021-08-03 19:02:39 +01:00
832a5c0bd9 [Media] Support any kind of thumbnails in the Core
Sanitize Attachments instead of Validate (part 1)
Ensure the intended filetypes and mimetypes during Vips conversions (part 1)
Various bug fixes
2021-07-22 21:10:45 +01:00
0eebcdbd51 [POSTING] Make it possible for plugins to change the placeholder string 2021-07-22 13:02:09 +01:00
4d2131808a [FILE][TemporaryFile] Fix various issues now that we also have Symfony's file abstractions 2021-07-20 23:46:18 +01:00
5f9b61f4bf [AUTOGENERATED] Update autogenerated code 2021-05-05 16:03:03 +00:00
b99fab00e9 [UTILS][TemporaryFile] Change way TemporaryFile takes arguments and it's internal implementation 2021-05-02 15:48:33 +00:00
3f565442d2 [Posting] Don't sanitize on storage
We prefer to have the original input in database and sanitize on output when appropriate
2021-05-02 00:00:03 +01:00
4397d12fa4 [AUTOGENERATED] Update auto generated code 2021-05-02 00:00:03 +01:00
ced6e236ce [ATTACHMENTS][GSFile] Rename ValidateAndStore functions 2021-05-01 23:57:51 +01:00
d9a3ecb116 [Posting] Add missing default visibility option 2021-04-30 23:08:08 +01:00
ebfa0e2240 [Avatar][Embed] Change use of TemporaryFile::getPath to getRealPath 2021-04-30 23:08:08 +01:00
c57a8481b1 [Avatar] Implement avatar deletion 2021-04-29 20:36:50 +00:00
ec0c551bb3 [AVATAR] Move avatar settings page to Avatar component 2021-04-29 18:14:49 +00:00
5fbc079c55 [RIGHT] Introduce component abstraction 2021-04-29 17:40:19 +01:00
bb56b24d8f [ATTACHMENTS] Restrict thumbnail generation to allowed sizes. Defaults to only configured sizes, but can be extended with the event 'GetAllowedThumbnailSizes'. The intention is to prevent DoS attacks, since handling a thumbnail request is a relatively slow process 2021-04-28 21:53:02 +00:00
495e66f4ae [AUTOGENERATED] Update autogenerated code 2021-04-27 21:24:48 +00:00
f388554166 [ATTACHMENTS][EVENT] Add onHashFile event, which can be used to deduplicate files
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
2021-04-27 20:53:59 +00:00
c1db9bd0a3 [Posting] Extract and store URLs from note content. Introduce 'AttachmentStoreNew' event 2021-04-25 21:20:28 +00:00
0f52638a80 [ATTACHMENTS] Further refactoring
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
2021-04-19 13:21:32 +01:00
acf5bd1ff5 [ImageThumbnail] Implement image resizing with Intervention/Image 2021-04-16 20:28:39 +01:00
2232f28283 [Posting] Rename file to attachment and cache result of actor tag query 2021-04-16 20:28:39 +01:00
b639ce906c [MEDIA] Rename File to Attachment 2021-04-16 20:28:39 +01:00
a5505bf848 [AUTOGENERATED] Update autogenerated code 2021-04-16 20:28:39 +01:00
a1cac40f6a [MODULES] Introduce the concept of abstract modules to V3
Introduce placeholder for abstract upload and thumb modules
Temporarily supress some bugs
2021-04-16 20:21:54 +01:00
Daniel
168b7d313a [Poll] Polls now have an associated note, poll templates, start_show_styles event, started css 2021-04-14 15:37:23 +00:00
adb5cfbb72 [AUTOGENERATED][DB][File][GroupJoinQueue] Update autogenerated code and add select fields as specified in the previous commit 2021-04-14 15:37:23 +00:00
256169a3c4 [GIT] Change my email to the new one in all files and bump copyright year 2021-04-14 15:37:23 +00:00
Hugo Sales
5cced1c9ed [DOCUMENTATION][REFACTOR] Add documentation to all flagged function and do some small cleanup 2021-04-14 15:37:23 +00:00
Hugo Sales
4c021a2838 [POSTING] Fix missing use statement 2021-04-14 15:37:23 +00:00
Hugo Sales
a7b7d487d7 POSTING remove REPLY route 2021-04-14 15:37:22 +00:00
Hugo Sales
774d7ffdf9 [Reply] Move reply functionality to a plugin 2021-04-14 15:37:22 +00:00
Hugo Sales
1c37eb7c72 [UI] Display error when submitted form is invalid 2021-04-14 15:37:22 +00:00
Hugo Sales
6926d70543 [Bridge] Replace zero dates with CURRENT_TIMESTAMP 2021-04-14 15:37:22 +00:00
Hugo Sales
ff96c2bb59 [AUTOGENERATED] Update autogenerated code in module entities 2021-04-14 15:37:22 +00:00
Hugo Sales
3affbc3c78 [Posting] Fix form name and remove unused recycle route and controller 2021-04-14 15:37:22 +00:00
Hugo Sales
5663e5e58d [Media] Add cache control directive to all files served 2021-04-14 15:37:22 +00:00
Hugo Sales
5cf7050008 [Media] Display images and videos inline in notes 2021-04-14 15:37:22 +00:00
Hugo Sales
54e8852fb7 [Posting] Fix posting form name and css 2021-04-14 15:37:22 +00:00
Hugo Sales
8f68d7deb4 [Posting] Add missing includes 2021-04-14 15:37:22 +00:00