Skip to content

Allow image uploading from external web URL  #201

Open
@mraf

Description

@mraf

Currently image uploading by URL in editor works only from current domain. Will be good to allow uploading from any web source


uploadByUrl: (url: string) => {
                    if (url.startsWith(window.location.origin)) {
                        return new Promise<any>(done => done({
                            success: 1,
                            file: {
                                url,
                            }
                        }));
                    } else {
                        toast.error('Please upload image via File manage')
                        return new Promise<any>(done => done({
                            success: 0,
                        }));
                    }
                }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions