diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-22 16:30:55 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-10-22 16:30:55 +0200 |
commit | 532e6a4172154716d6c6ab2a7f715625d600987c (patch) | |
tree | 0d84b59b1d4e9e6ff3f78c7f4c553bdb38c90734 | |
parent | 7fb2c60bbe97fe50a8f459858bf89d311df29690 (diff) | |
download | PeerTube-532e6a4172154716d6c6ab2a7f715625d600987c.tar.gz PeerTube-532e6a4172154716d6c6ab2a7f715625d600987c.tar.zst PeerTube-532e6a4172154716d6c6ab2a7f715625d600987c.zip |
Remove aws bug workaround
This has been fixed in https://github.com/aws/aws-sdk-js-v3/pull/2835
-rw-r--r-- | server/lib/activitypub/videos/shared/creator.ts | 1 | ||||
-rw-r--r-- | server/lib/object-storage/shared/client.ts | 14 |
2 files changed, 0 insertions, 15 deletions
diff --git a/server/lib/activitypub/videos/shared/creator.ts b/server/lib/activitypub/videos/shared/creator.ts index ad3b88936..688bcbb53 100644 --- a/server/lib/activitypub/videos/shared/creator.ts +++ b/server/lib/activitypub/videos/shared/creator.ts | |||
@@ -64,7 +64,6 @@ export class APVideoCreator extends APVideoAbstractBuilder { | |||
64 | return { autoBlacklisted, videoCreated } | 64 | return { autoBlacklisted, videoCreated } |
65 | } catch (err) { | 65 | } catch (err) { |
66 | // FIXME: Use rollback hook when https://github.com/sequelize/sequelize/pull/13038 is released | 66 | // FIXME: Use rollback hook when https://github.com/sequelize/sequelize/pull/13038 is released |
67 | // Remove thumbnail | ||
68 | if (thumbnailModel) await thumbnailModel.removeThumbnail() | 67 | if (thumbnailModel) await thumbnailModel.removeThumbnail() |
69 | 68 | ||
70 | throw err | 69 | throw err |
diff --git a/server/lib/object-storage/shared/client.ts b/server/lib/object-storage/shared/client.ts index 85682c492..c9a614593 100644 --- a/server/lib/object-storage/shared/client.ts +++ b/server/lib/object-storage/shared/client.ts | |||
@@ -29,20 +29,6 @@ function getClient () { | |||
29 | : undefined | 29 | : undefined |
30 | }) | 30 | }) |
31 | 31 | ||
32 | // FIXME: https://github.com/aws/aws-sdk-js-v3/issues/2445 workaround | ||
33 | s3Client.middlewareStack.add( | ||
34 | (next, _context) => (args: any) => { | ||
35 | if (typeof args.request?.body === 'string' && args.request.body.includes('CompletedMultipartUpload')) { | ||
36 | args.request.body = args.request.body.replace(/CompletedMultipartUpload/g, 'CompleteMultipartUpload') | ||
37 | } | ||
38 | return next(args) | ||
39 | }, | ||
40 | { | ||
41 | step: 'build', | ||
42 | priority: 'high' | ||
43 | } | ||
44 | ) | ||
45 | |||
46 | logger.info('Initialized S3 client %s with region %s.', getEndpoint(), OBJECT_STORAGE.REGION, lTags()) | 32 | logger.info('Initialized S3 client %s with region %s.', getEndpoint(), OBJECT_STORAGE.REGION, lTags()) |
47 | 33 | ||
48 | return s3Client | 34 | return s3Client |