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

Commit 3330250

Browse files
committed
fix: refactored to allow copy and paste images from another website
Doesn't fix issue with #5, but does allow pasting from external websites.
1 parent 6223702 commit 3330250

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

admin/src/components/editorjs/requiredTools.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ const requiredTools = {
3636
}
3737
}
3838

39-
export default requiredTools
39+
export default requiredTools

server/controllers/editorjs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = ({ strapi }) => ({
3232
try {
3333
const { files } = parseMultipartData(ctx)
3434

35-
const [uploadedFile] = await strapi.plugin.upload.services.upload.upload({
35+
const [uploadedFile] = await strapi.plugin('upload').service('upload').upload({
3636
data: {},
3737
files: Object.values(files)
3838
})
@@ -69,7 +69,7 @@ module.exports = ({ strapi }) => ({
6969
size: Buffer.byteLength(buffer),
7070
}
7171

72-
const [uploadedFile] = await strapi.plugin.upload.services.upload.upload({
72+
const [uploadedFile] = await strapi.plugin('upload').service('upload').upload({
7373
data: {},
7474
files: file
7575
})

0 commit comments

Comments
 (0)