grails-ckeditor icon indicating copy to clipboard operation
grails-ckeditor copied to clipboard

BaseUrl is ignored when uploading an image

Open DnlOrr opened this issue 7 years ago • 0 comments

I have specified the baseurl and basedir in the configuration however when I upload an image the baseurl is ignored.

In grails-ckeditor/src/main/groovy/grails/plugins/ckeditor/utils/PathUtils.groovy // line 33

static getBaseUrl(params) { def config = Holders.config.ckeditor def baseUrl if (config?.upload?.baseurl) { baseUrl = "" // shouldn't be baseUrl = config.upload.baseurl? } else { baseUrl = config?.upload?.basedir ?: CkeditorConfig.DEFAULT_BASEDIR } baseUrl = PathUtils.checkSlashes(baseUrl, "L- R-", true) def spaceDir = PathUtils.sanitizePath(params.space) if (spaceDir) { baseUrl += "/" + spaceDir } def typeName = PathUtils.sanitizePath(params.type?.toLowerCase()) if (typeName) { typeName = WordUtils.capitalize(typeName) baseUrl += "/" + typeName } return baseUrl }

DnlOrr avatar Dec 22 '17 10:12 DnlOrr