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

{success: 0} not working! #251

Open
rahulnikam2002 opened this issue Jun 16, 2024 · 0 comments
Open

{success: 0} not working! #251

rahulnikam2002 opened this issue Jun 16, 2024 · 0 comments

Comments

@rahulnikam2002
Copy link

If there's error, still the loading is showing!!

Console Message

Image Tool: uploading failed because of incorrect response: {success: 0}

Screenshot 2024-06-16 204336

success: 0 is not working ig!!

My code:

image: {
class: editorPlugins.ImageTool.class,
config: {
uploader: {
async uploadByFile(file) {
const url = await uploadFile(file);

                if (url.uploaded) {
                    alert("hello");
                    toast.success("Image uploaded successfully!");
                    return { success: 1, file: { url: url.data.secure_url, data: url.data } };
                }
                toast.error("Failed to upload image!");
                return {
                    success: 0
                };
            }
        }
    }
}
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