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

Allow image uploading from external web URL #201

Open
mraf opened this issue Jul 7, 2022 · 0 comments
Open

Allow image uploading from external web URL #201

mraf opened this issue Jul 7, 2022 · 0 comments

Comments

@mraf
Copy link
Contributor

mraf commented Jul 7, 2022

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