Cromwell icon indicating copy to clipboard operation
Cromwell copied to clipboard

Allow image uploading from external web URL

Open mraf opened this issue 2 years ago • 0 comments

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

mraf avatar Jul 07 '22 03:07 mraf