This has been fixed in https://github.com/aws/aws-sdk-js-v3/pull/2835
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
: 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