diff --git a/admin/src/components/editorjs/requiredTools.js b/admin/src/components/editorjs/requiredTools.js index cb38660..a42b655 100644 --- a/admin/src/components/editorjs/requiredTools.js +++ b/admin/src/components/editorjs/requiredTools.js @@ -36,4 +36,4 @@ const requiredTools = { } } -export default requiredTools \ No newline at end of file +export default requiredTools diff --git a/server/controllers/editorjs.js b/server/controllers/editorjs.js index d6da22c..5bc1a4f 100644 --- a/server/controllers/editorjs.js +++ b/server/controllers/editorjs.js @@ -32,7 +32,7 @@ module.exports = ({ strapi }) => ({ try { const { files } = parseMultipartData(ctx) - const [uploadedFile] = await strapi.plugin.upload.services.upload.upload({ + const [uploadedFile] = await strapi.plugin('upload').service('upload').upload({ data: {}, files: Object.values(files) }) @@ -69,7 +69,7 @@ module.exports = ({ strapi }) => ({ size: Buffer.byteLength(buffer), } - const [uploadedFile] = await strapi.plugin.upload.services.upload.upload({ + const [uploadedFile] = await strapi.plugin('upload').service('upload').upload({ data: {}, files: file })