diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-10 09:42:37 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-10 09:43:33 +0100 |
commit | 020d3d3d79338148873cfd78ba59856f63260f2f (patch) | |
tree | 343218cafb3573d7285c4c4616d629f398009913 /shared/extra-utils/videos/videos-command.ts | |
parent | 1868ff3db93a8f2e4ceb91aa3600b633ca00b4f7 (diff) | |
download | PeerTube-020d3d3d79338148873cfd78ba59856f63260f2f.tar.gz PeerTube-020d3d3d79338148873cfd78ba59856f63260f2f.tar.zst PeerTube-020d3d3d79338148873cfd78ba59856f63260f2f.zip |
Remove resumable cache after upload success
Diffstat (limited to 'shared/extra-utils/videos/videos-command.ts')
-rw-r--r-- | shared/extra-utils/videos/videos-command.ts | 14 |
1 files changed, 12 insertions, 2 deletions
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 { | |||
469 | attributes: VideoEdit | 469 | attributes: VideoEdit |
470 | size: number | 470 | size: number |
471 | mimetype: string | 471 | mimetype: string |
472 | |||
473 | originalName?: string | ||
474 | lastModified?: number | ||
472 | }) { | 475 | }) { |
473 | const { attributes, size, mimetype } = options | 476 | const { attributes, originalName, lastModified, size, mimetype } = options |
474 | 477 | ||
475 | const path = '/api/v1/videos/upload-resumable' | 478 | const path = '/api/v1/videos/upload-resumable' |
476 | 479 | ||
@@ -482,7 +485,14 @@ export class VideosCommand extends AbstractCommand { | |||
482 | 'X-Upload-Content-Type': mimetype, | 485 | 'X-Upload-Content-Type': mimetype, |
483 | 'X-Upload-Content-Length': size.toString() | 486 | 'X-Upload-Content-Length': size.toString() |
484 | }, | 487 | }, |
485 | fields: { filename: attributes.fixture, ...this.buildUploadFields(options.attributes) }, | 488 | fields: { |
489 | filename: attributes.fixture, | ||
490 | originalName, | ||
491 | lastModified, | ||
492 | |||
493 | ...this.buildUploadFields(options.attributes) | ||
494 | }, | ||
495 | |||
486 | // Fixture will be sent later | 496 | // Fixture will be sent later |
487 | attaches: this.buildUploadAttaches(omit(options.attributes, 'fixture')), | 497 | attaches: this.buildUploadAttaches(omit(options.attributes, 'fixture')), |
488 | implicitToken: true, | 498 | implicitToken: true, |