Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image uploaded, no message error, but image doesn't show up #67

Closed
taserflanger opened this issue Mar 26, 2020 · 2 comments
Closed

Image uploaded, no message error, but image doesn't show up #67

taserflanger opened this issue Mar 26, 2020 · 2 comments

Comments

@taserflanger
Copy link

Hi, this is my current configuration for the tool:

        image: {
            class: ImageTool,
            config: {
                endpoints: {
                    byFile: '/site_content/uploadFile.php',
                    byUrl: '/site_content/fetchUrl.php'
                }
            }
        }

and my uploadFile.php returns:

{ "success": 1, "file": "https://mywebsite.com/static/uploads/image_name.png" }

The generated url is correct, when i paste it in the browser the image does show up
but still the preloader is turning and no image appears:
image

Why is this happening? Is there a secret step I missed?

@taserflanger
Copy link
Author

Edit: When i call editorjs.save to save the data into my database, it saves the correct url and when I parse the json back into html, i actually get the right image. I strongly suspect there is just a problem with the image tool documentation on the format of the response because on the main page of editorjs.io, when I put the image I see a response like this and it works:
image, plus in the source code it actually renders file["url"]

@taserflanger
Copy link
Author

Well, actually just reallised I did not read the documentation and just solved a problem that did not exist. Closing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant