Commit Graph

66 Commits (c158a5faabb8ef0bc5d121fda4522d63603e8bc5)

Author SHA1 Message Date
Chocobozzz 7d9ba5c089
Cleanup models directory organization 2021-05-11 11:32:31 +02:00
kontrollanten f6d6e7f861
Resumable video uploads (#3933)
* WIP: resumable video uploads

relates to #324

* fix review comments

* video upload: error handling

* fix audio upload

* fixes after self review

* Update server/controllers/api/videos/index.ts

Co-authored-by: Rigel Kent <par@rigelk.eu>

* Update server/middlewares/validators/videos/videos.ts

Co-authored-by: Rigel Kent <par@rigelk.eu>

* Update server/controllers/api/videos/index.ts

Co-authored-by: Rigel Kent <par@rigelk.eu>

* update after code review

* refactor upload route

- restore multipart upload route
- move resumable to dedicated upload-resumable route
- move checks to middleware
- do not leak internal fs structure in response

* fix yarn.lock upon rebase

* factorize addVideo for reuse in both endpoints

* add resumable upload API to openapi spec

* add initial test and test helper for resumable upload

* typings for videoAddResumable middleware

* avoid including aws and google packages via node-uploadx, by only including uploadx/core

* rename ex-isAudioBg to more explicit name mentioning it is a preview file for audio

* add video-upload-tmp-folder-cleaner job

* stronger typing of video upload middleware

* reduce dependency to @uploadx/core

* add audio upload test

* refactor resumable uploads cleanup from job to scheduler

* refactor resumable uploads scheduler to compare to last execution time

* make resumable upload validator to always cleanup on failure

* move legacy upload request building outside of uploadVideo test helper

* filter upload-resumable middlewares down to POST, PUT, DELETE

also begin to type metadata

* merge add duration functions

* stronger typings and documentation for uploadx behaviour, move init validator up

* refactor(client/video-edit): options > uploadxOptions

* refactor(client/video-edit): remove obsolete else

* scheduler/remove-dangling-resum: rename tag

* refactor(server/video): add UploadVideoFiles type

* refactor(mw/validators): restructure eslint disable

* refactor(mw/validators/videos): rename import

* refactor(client/vid-upload): rename html elem id

* refactor(sched/remove-dangl): move fn to method

* refactor(mw/async): add method typing

* refactor(mw/vali/video): double quote > single

* refactor(server/upload-resum): express use > all

* proper http methud enum server/middlewares/async.ts

* properly type http methods

* factorize common video upload validation steps

* add check for maximum partially uploaded file size

* fix audioBg use

* fix extname(filename) in addVideo

* document parameters for uploadx's resumable protocol

* clear META files in scheduler

* last audio refactor before cramming preview in the initial POST form data

* refactor as mulitpart/form-data initial post request

this allows preview/thumbnail uploads alongside the initial request,
and cleans up the upload form

* Add more tests for resumable uploads

* Refactor remove dangling resumable uploads

* Prepare changelog

* Add more resumable upload tests

* Remove user quota check for resumable uploads

* Fix upload error handler

* Update nginx template for upload-resumable

* Cleanup comment

* Remove unused express methods

* Prefer to use got instead of raw http

* Don't retry on error 500

Co-authored-by: Rigel Kent <par@rigelk.eu>
Co-authored-by: Rigel Kent <sendmemail@rigelk.eu>
Co-authored-by: Chocobozzz <me@florianbigard.com>
2021-05-10 11:13:41 +02:00
Chocobozzz fae6e4da8f Try to speed up server tests 2021-02-19 09:36:50 +01:00
Chocobozzz 99afa081bc
Add AP stats 2020-12-15 13:34:58 +01:00
Rigel Kent 2d53be0267
replace numbers with typed http status codes (#3409) 2020-12-07 14:32:36 +01:00
Chocobozzz de94ac86a2
Fix incorrect IDs in AP federation 2020-11-20 11:21:08 +01:00
Chocobozzz ea3674d04d
Remove notifications of muted accounts/servers 2020-11-18 11:32:57 +01:00
Chocobozzz 3cc665f48f
Add last login date to users 2020-05-07 10:39:09 +02:00
Chocobozzz e1c5503114 Support logout and add id and pass tests 2020-05-04 16:21:39 +02:00
Chocobozzz 8dc8a34ee8 Avoir some circular dependencies 2020-05-04 16:21:39 +02:00
Rigel Kent e0a929179a Add filter inputs for blacklisted videos and muted accounts/servers 2020-05-01 16:41:02 +02:00
Chocobozzz baab47ca81
Fix total videos stats 2020-03-13 14:54:00 +01:00
Chocobozzz a15871560f
Move to eslint 2020-02-03 08:31:02 +01:00
Chocobozzz b764380ac2 Add ability to list redundancies 2020-01-28 11:35:26 +01:00
Rigel Kent f2f0eda543 Adapt feeds content-type to accept header 2020-01-10 10:14:04 +01:00
Chocobozzz 3c0d0c669d
Fix logs regex 2019-12-12 09:43:59 +01:00
Chocobozzz 566c125d6e
Serve audit logs to client 2019-12-11 14:14:01 +01:00
Chocobozzz 97ecddae10
Filter on follows actor types in about page 2019-11-29 10:55:17 +01:00
Chocobozzz b8f4167fb6
Only display accepted followers/followings in about page 2019-11-28 11:37:32 +01:00
Chocobozzz a18bb55e9b
Fix error log when updating redundancy 2019-11-27 10:29:26 +01:00
Chocobozzz 8424c4026a Add auto follow back support for instances 2019-09-04 16:24:58 +02:00
Nassim Bounouas 4e9fa5b7e9 Feature/subject in contact form (#1926)
* #1915 Add a subject to contact form and add it to email sent

* #1915 Add subject to contact form tests

* #1915 Contact form test corrected && tslint correction
2019-06-21 08:49:35 +02:00
Chocobozzz cda03765fe
Add ability to delete old remote views 2019-04-12 08:31:06 +02:00
Chocobozzz 74dc3bca2b
Don't expose constants directly in initializers/ 2019-04-11 14:26:41 +02:00
Chocobozzz 6dd9de95df
Move config in its own file 2019-04-11 13:45:39 +02:00
Chocobozzz 5d79474cc6
Add debug component to help admins to fix IP issues 2019-04-11 10:58:09 +02:00
Chocobozzz 2c22613c2f
Add logs page in client 2019-04-11 10:14:08 +02:00
Chocobozzz fd8710b897
Add logs endpoint 2019-04-10 16:38:32 +02:00
Chocobozzz 14893eb71c
Add ability to manually approves instance followers in REST API 2019-04-08 15:18:04 +02:00
Chocobozzz 5b9c965d5a
Add ability to forbid followers 2019-04-08 14:06:23 +02:00
Chocobozzz 0e9c48c2ed
Add ability to remove an instance follower in API 2019-04-08 11:52:43 +02:00
Chocobozzz dae86118ed
Cleanup express locals typings 2019-03-19 10:35:15 +01:00
Chocobozzz 44b9c0ba31
Add totalLocalVideoFilesSize in stats 2019-01-15 09:45:54 +01:00
Chocobozzz a4101923e6
Implement contact form on server side 2019-01-10 11:32:37 +01:00
Chocobozzz b44164bb56 Add ability to mute a user/instance by server in server api 2018-10-16 16:41:36 +02:00
Chocobozzz b014b6b9c7
Add ability to search on followers/following 2018-10-10 09:43:53 +02:00
Chocobozzz 161b061d4e
Remove duplicated videos on unfollow/delete redundancy 2018-09-28 10:07:05 +02:00
Chocobozzz d9bdd007d7
Put config redundancy strategies in "strategies" subkey 2018-09-19 16:12:07 +02:00
Chocobozzz 4b5384f6e7
Add redundancy stats 2018-09-14 14:57:59 +02:00
Chocobozzz c48e82b5e0 Basic video redundancy implementation 2018-09-13 14:05:49 +02:00
Chocobozzz 06a05d5f47 Add subscriptions endpoints to REST API 2018-08-27 09:41:54 +02:00
Chocobozzz 5350fd8e5b
Move server follow in the job queue
It helps to track follow errors
2018-04-18 15:32:40 +02:00
Chocobozzz d5b7d9110d
Fix error logging 2018-03-26 16:04:14 +02:00
Chocobozzz 09cababd79
Add stats route 2018-02-28 18:04:55 +01:00
Chocobozzz 1ee48d1903
Don't follow ourselves 2018-02-23 14:48:30 +01:00
Chocobozzz 94a5ff8a4a
Move job queue to redis
We'll use it as cache in the future.

/!\ You'll loose your old jobs (pending jobs too) so upgrade only when
you don't have pending job anymore.
2018-01-25 18:41:17 +01:00
Dimitri Gilbert 1569a81894 Basic api documentation #7 (#220)
* Basic api documentation

* fix styling issue

* fix styling issue

* gitignore unecessary folders

* openApi 2.0 first draft

* solved conflicts

* solved errors in openapi file

* added missing doc on video + deleted apidoc comments

* fix last warnings and errors inopenapi definition
2018-01-24 10:44:52 +01:00
Chocobozzz f05a1c30c1
Don't show videos of remote instance after unfollow 2018-01-18 15:42:20 +01:00
Chocobozzz 1174a8479a
Set sort refractoring 2018-01-18 15:42:20 +01:00
Chocobozzz 7bc2917145
Add tests to handle down server 2018-01-11 11:47:44 +01:00