From 5a0caebadabb5e157ecbb1460be81cde714b4e8f Mon Sep 17 00:00:00 2001 From: Alexandre Bodin Date: Mon, 20 Mar 2023 12:27:33 +0100 Subject: [PATCH] Update styling --- packages/providers/upload-aws-s3/lib/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/providers/upload-aws-s3/lib/index.js b/packages/providers/upload-aws-s3/lib/index.js index 8be401565b..3ac75291dd 100644 --- a/packages/providers/upload-aws-s3/lib/index.js +++ b/packages/providers/upload-aws-s3/lib/index.js @@ -16,10 +16,11 @@ function assertUrlProtocol(url) { module.exports = { init({ baseUrl = null, rootPath = null, s3Options, ...legacyS3Options }) { - if (legacyS3Options) + if (legacyS3Options) { process.emitWarning( "S3 configuration options passed at root level of the plugin's providerOptions is deprecated and will be removed in a future release. Please wrap them inside the 's3Options:{}' property." ); + } const S3 = new AWS.S3({ apiVersion: '2006-03-01', @@ -29,11 +30,11 @@ module.exports = { const filePrefix = rootPath ? `${rootPath.replace(/\/+$/, '')}/` : ''; - function getFileKey(file) { + const getFileKey = (file) => { const path = file.path ? `${file.path}/` : ''; return `${filePrefix}${path}${file.hash}${file.ext}`; - } + }; const upload = (file, customParams = {}) => new Promise((resolve, reject) => {