Skip to content

{success: 0} not working! #251

@rahulnikam2002

Description

@rahulnikam2002

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
                };
            }
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions