Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resumable video uploads #3933

Merged
merged 63 commits into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
6642fef
WIP: resumable video uploads
kontrollanten Apr 7, 2021
1e87865
fix review comments
kontrollanten Apr 7, 2021
65c5690
video upload: error handling
kontrollanten Apr 16, 2021
cbdd1c1
fix audio upload
kontrollanten Apr 16, 2021
a6809dc
fixes after self review
kontrollanten Apr 16, 2021
c76feb3
Update server/controllers/api/videos/index.ts
kontrollanten Apr 16, 2021
863af35
Update server/middlewares/validators/videos/videos.ts
kontrollanten Apr 16, 2021
f55ed19
Update server/controllers/api/videos/index.ts
kontrollanten Apr 16, 2021
53f0028
update after code review
kontrollanten Apr 17, 2021
cdd5a8b
refactor upload route
rigelk Apr 17, 2021
b62734e
fix yarn.lock upon rebase
rigelk Apr 17, 2021
97d8948
factorize addVideo for reuse in both endpoints
rigelk Apr 17, 2021
8736c7a
add resumable upload API to openapi spec
rigelk Apr 17, 2021
a6c7743
add initial test and test helper for resumable upload
rigelk Apr 18, 2021
cee4731
typings for videoAddResumable middleware
rigelk Apr 19, 2021
db974f1
avoid including aws and google packages via node-uploadx, by only inc…
rigelk Apr 19, 2021
00fea63
rename ex-isAudioBg to more explicit name mentioning it is a preview …
rigelk Apr 19, 2021
cb5f08c
add video-upload-tmp-folder-cleaner job
kontrollanten Apr 19, 2021
bada513
stronger typing of video upload middleware
rigelk Apr 20, 2021
992cb64
reduce dependency to @uploadx/core
rigelk Apr 21, 2021
547fc69
add audio upload test
rigelk Apr 21, 2021
775fcd6
refactor resumable uploads cleanup from job to scheduler
rigelk Apr 21, 2021
36ec59f
refactor resumable uploads scheduler to compare to last execution time
rigelk Apr 21, 2021
3b0518f
make resumable upload validator to always cleanup on failure
rigelk Apr 21, 2021
09d366a
move legacy upload request building outside of uploadVideo test helper
rigelk Apr 21, 2021
5d9e8d4
filter upload-resumable middlewares down to POST, PUT, DELETE
rigelk Apr 22, 2021
cfeb4df
merge add duration functions
rigelk Apr 22, 2021
2b54746
stronger typings and documentation for uploadx behaviour, move init v…
rigelk Apr 22, 2021
4aecfc9
refactor(client/video-edit): options > uploadxOptions
kontrollanten Apr 26, 2021
01f5429
refactor(client/video-edit): remove obsolete else
kontrollanten Apr 26, 2021
9a61f01
scheduler/remove-dangling-resum: rename tag
kontrollanten Apr 26, 2021
057647d
refactor(server/video): add UploadVideoFiles type
kontrollanten Apr 26, 2021
039dd4a
refactor(mw/validators): restructure eslint disable
kontrollanten Apr 26, 2021
b009cc6
refactor(mw/validators/videos): rename import
kontrollanten Apr 26, 2021
878cc41
refactor(client/vid-upload): rename html elem id
kontrollanten Apr 26, 2021
d194093
refactor(sched/remove-dangl): move fn to method
kontrollanten Apr 26, 2021
af501e2
refactor(mw/async): add method typing
kontrollanten Apr 26, 2021
5f44fdc
refactor(mw/vali/video): double quote > single
kontrollanten Apr 26, 2021
be70e48
refactor(server/upload-resum): express use > all
kontrollanten Apr 26, 2021
78aace1
proper http methud enum server/middlewares/async.ts
rigelk Apr 26, 2021
d2bf69e
properly type http methods
rigelk Apr 26, 2021
9e0c57b
factorize common video upload validation steps
rigelk Apr 26, 2021
c0e4d8a
add check for maximum partially uploaded file size
rigelk Apr 26, 2021
990a1f7
fix audioBg use
rigelk Apr 27, 2021
7ab177c
fix extname(filename) in addVideo
rigelk Apr 27, 2021
06aade6
document parameters for uploadx's resumable protocol
rigelk Apr 27, 2021
5038002
clear META files in scheduler
rigelk Apr 27, 2021
9466c54
last audio refactor before cramming preview in the initial POST form …
rigelk Apr 28, 2021
4951b3b
refactor as mulitpart/form-data initial post request
rigelk Apr 29, 2021
eb9dbaa
Merge branch 'develop' into feat-324-resume-upload
Chocobozzz May 4, 2021
bd3c2da
Add more tests for resumable uploads
Chocobozzz May 4, 2021
8420cc5
Refactor remove dangling resumable uploads
Chocobozzz May 5, 2021
173e61e
Prepare changelog
Chocobozzz May 6, 2021
75cec91
Merge branch 'develop' into feat-324-resume-upload
Chocobozzz May 6, 2021
0e7f00c
Add more resumable upload tests
Chocobozzz May 6, 2021
dab019e
Remove user quota check for resumable uploads
Chocobozzz May 6, 2021
2da893c
Fix upload error handler
Chocobozzz May 6, 2021
3945fb9
Update nginx template for upload-resumable
Chocobozzz May 6, 2021
e997eee
Cleanup comment
Chocobozzz May 6, 2021
c09fb12
Remove unused express methods
Chocobozzz May 6, 2021
e23496c
Prefer to use got instead of raw http
Chocobozzz May 6, 2021
58c948b
Merge branch 'develop' into feat-324-resume-upload
Chocobozzz May 7, 2021
6b4ee4f
Don't retry on error 500
Chocobozzz May 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix audioBg use
  • Loading branch information
rigelk committed Apr 29, 2021
commit 990a1f76a5641e121b7785cd90fc733af5292200
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
...this.uploadxOptions,
metadata: {
...this.uploadxOptions.metadata,
audioBg
audioBg // only used for audio background generation
}
})
this.isUploadingPreviewFile = false
Expand Down
4 changes: 3 additions & 1 deletion server/controllers/api/videos/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ async function addVideoLegacy (req: express.Request, res: express.Response) {
async function addVideoResumable (req: express.Request, res: express.Response) {
const videoPhysicalFile = res.locals.videoFileResumable
const videoInfo = videoPhysicalFile.metadata
const files = { image: { path: getResumableUploadPath(videoPhysicalFile.filename) } }
const files = { // only used for audio background generation
audioBg: { path: getResumableUploadPath(videoPhysicalFile.metadata.audioBg) }
}

return addVideo(req, res, { videoPhysicalFile, videoInfo, files })
rigelk marked this conversation as resolved.
Show resolved Hide resolved
}
Expand Down