diff options
Diffstat (limited to 'shared/extra-utils/videos/videos-command.ts')
-rw-r--r-- | shared/extra-utils/videos/videos-command.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/shared/extra-utils/videos/videos-command.ts b/shared/extra-utils/videos/videos-command.ts index d35339c8d..63980c147 100644 --- a/shared/extra-utils/videos/videos-command.ts +++ b/shared/extra-utils/videos/videos-command.ts | |||
@@ -449,6 +449,8 @@ export class VideosCommand extends AbstractCommand { | |||
449 | 449 | ||
450 | const result = await this.sendResumableChunks({ ...options, pathUploadId, videoFilePath, size }) | 450 | const result = await this.sendResumableChunks({ ...options, pathUploadId, videoFilePath, size }) |
451 | 451 | ||
452 | await this.endResumableUpload({ ...options, pathUploadId }) | ||
453 | |||
452 | return result.body?.video || result.body as any | 454 | return result.body?.video || result.body as any |
453 | } | 455 | } |
454 | 456 | ||
@@ -542,6 +544,19 @@ export class VideosCommand extends AbstractCommand { | |||
542 | }) | 544 | }) |
543 | } | 545 | } |
544 | 546 | ||
547 | endResumableUpload (options: OverrideCommandOptions & { | ||
548 | pathUploadId: string | ||
549 | }) { | ||
550 | return this.deleteRequest({ | ||
551 | ...options, | ||
552 | |||
553 | path: '/api/v1/videos/upload-resumable', | ||
554 | rawQuery: options.pathUploadId, | ||
555 | implicitToken: true, | ||
556 | defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204 | ||
557 | }) | ||
558 | } | ||
559 | |||
545 | quickUpload (options: OverrideCommandOptions & { | 560 | quickUpload (options: OverrideCommandOptions & { |
546 | name: string | 561 | name: string |
547 | nsfw?: boolean | 562 | nsfw?: boolean |