We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61d4c7a commit cd94435Copy full SHA for cd94435
1 file changed
core/utils/common.js
@@ -259,9 +259,12 @@ common.uploadFileToOSS = function (key, filePath) {
259
endpoint: _.get(config, 'oss.endpoint'),
260
apiVersion: '2013-10-15',
261
}));
262
+ if (!_.isEmpty(_.get(config, 'oss.prefix', ""))) {
263
+ key = `${_.get(config, 'oss.prefix')}/${key}`;
264
+ }
265
var upload = ossStream.upload({
266
Bucket: _.get(config, 'oss.bucketName'),
- Key: `${_.get(config, 'oss.prefix')}/${key}`,
267
+ Key: key,
268
});
269
270
return new Promise((resolve, reject) => {
0 commit comments