grails-ckeditor
grails-ckeditor copied to clipboard
BaseUrl is ignored when uploading an image
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 }