Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Commit

Permalink
fix: refactored to allow copy and paste images from another website
Browse files Browse the repository at this point in the history
Doesn't fix issue with #5, but does allow pasting from external websites.
  • Loading branch information
jaskipper committed Feb 27, 2022
1 parent 6223702 commit 3330250
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion admin/src/components/editorjs/requiredTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ const requiredTools = {
}
}

export default requiredTools
export default requiredTools
4 changes: 2 additions & 2 deletions server/controllers/editorjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down Expand Up @@ -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
})
Expand Down

0 comments on commit 3330250

Please sign in to comment.