mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 02:16:03 +00:00
change lodash import to be fp
This commit is contained in:
parent
312be981e0
commit
271da71213
@ -6,7 +6,7 @@
|
||||
|
||||
/* eslint-disable no-unused-vars */
|
||||
// Public node modules.
|
||||
const get = require('lodash/get');
|
||||
const { get } = require('lodash/fp');
|
||||
const AWS = require('aws-sdk');
|
||||
const { getBucketFromUrl } = require('./utils');
|
||||
|
||||
@ -22,7 +22,7 @@ module.exports = {
|
||||
...config,
|
||||
});
|
||||
|
||||
const ACL = get(config, ['params', 'ACL'], 'public-read');
|
||||
const ACL = get(['params', 'ACL'], config, 'public-read');
|
||||
|
||||
const upload = (file, customParams = {}) =>
|
||||
new Promise((resolve, reject) => {
|
||||
@ -82,7 +82,7 @@ module.exports = {
|
||||
{
|
||||
Bucket: config.params.Bucket,
|
||||
Key: fileKey,
|
||||
Expires: get(config, ['params', 'signedUrlExpires'], 60 * 60 * 24 * 7), // 7 days
|
||||
Expires: get(['params', 'signedUrlExpires'], config, 60 * 60 * 24 * 7), // 7 days
|
||||
},
|
||||
(err, url) => {
|
||||
if (err) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user