]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Remove aws bug workaround
authorChocobozzz <me@florianbigard.com>
Fri, 22 Oct 2021 14:30:55 +0000 (16:30 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 22 Oct 2021 14:30:55 +0000 (16:30 +0200)
This has been fixed in https://github.com/aws/aws-sdk-js-v3/pull/2835

server/lib/activitypub/videos/shared/creator.ts
server/lib/object-storage/shared/client.ts

index ad3b889364ad40c56e640582ac955629f5a35c72..688bcbb534b344059a2a9707501eaebdd4708c55 100644 (file)
@@ -64,7 +64,6 @@ export class APVideoCreator extends APVideoAbstractBuilder {
         return { autoBlacklisted, videoCreated }
       } catch (err) {
         // FIXME: Use rollback hook when https://github.com/sequelize/sequelize/pull/13038 is released
-        // Remove thumbnail
         if (thumbnailModel) await thumbnailModel.removeThumbnail()
 
         throw err
index 85682c4926e397c877764e52e29b79c98dadf9b0..c9a6145933674e22a5dba5d25b5ce948d1b9c2fe 100644 (file)
@@ -29,20 +29,6 @@ function getClient () {
       : undefined
   })
 
-  // FIXME: https://github.com/aws/aws-sdk-js-v3/issues/2445 workaround
-  s3Client.middlewareStack.add(
-    (next, _context) => (args: any) => {
-      if (typeof args.request?.body === 'string' && args.request.body.includes('CompletedMultipartUpload')) {
-        args.request.body = args.request.body.replace(/CompletedMultipartUpload/g, 'CompleteMultipartUpload')
-      }
-      return next(args)
-    },
-    {
-      step: 'build',
-      priority: 'high'
-    }
-  )
-
   logger.info('Initialized S3 client %s with region %s.', getEndpoint(), OBJECT_STORAGE.REGION, lTags())
 
   return s3Client