From 020d3d3d79338148873cfd78ba59856f63260f2f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 10 Nov 2021 09:42:37 +0100 Subject: Remove resumable cache after upload success --- shared/extra-utils/videos/videos-command.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'shared') diff --git a/shared/extra-utils/videos/videos-command.ts b/shared/extra-utils/videos/videos-command.ts index 68241f062..167fae22d 100644 --- a/shared/extra-utils/videos/videos-command.ts +++ b/shared/extra-utils/videos/videos-command.ts @@ -469,8 +469,11 @@ export class VideosCommand extends AbstractCommand { attributes: VideoEdit size: number mimetype: string + + originalName?: string + lastModified?: number }) { - const { attributes, size, mimetype } = options + const { attributes, originalName, lastModified, size, mimetype } = options const path = '/api/v1/videos/upload-resumable' @@ -482,7 +485,14 @@ export class VideosCommand extends AbstractCommand { 'X-Upload-Content-Type': mimetype, 'X-Upload-Content-Length': size.toString() }, - fields: { filename: attributes.fixture, ...this.buildUploadFields(options.attributes) }, + fields: { + filename: attributes.fixture, + originalName, + lastModified, + + ...this.buildUploadFields(options.attributes) + }, + // Fixture will be sent later attaches: this.buildUploadAttaches(omit(options.attributes, 'fixture')), implicitToken: true, -- cgit v1.2.3