mirror of
https://github.com/strapi/strapi.git
synced 2025-12-16 17:53:53 +00:00
change comment
This commit is contained in:
parent
60ac7848e1
commit
dbd85eef4f
@ -243,10 +243,8 @@ module.exports = ({ strapi }) => ({
|
|||||||
*/
|
*/
|
||||||
async uploadFileAndPersist(fileData, { user } = {}) {
|
async uploadFileAndPersist(fileData, { user } = {}) {
|
||||||
const config = strapi.config.get('plugin.upload');
|
const config = strapi.config.get('plugin.upload');
|
||||||
|
|
||||||
const { isImage } = getService('image-manipulation');
|
const { isImage } = getService('image-manipulation');
|
||||||
|
|
||||||
// Validate image size
|
|
||||||
await getService('provider').checkFileSize(fileData);
|
await getService('provider').checkFileSize(fileData);
|
||||||
|
|
||||||
if (await isImage(fileData)) {
|
if (await isImage(fileData)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user