-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
I lost uploaded images when war undeployed from OpenLiberty.
It is possible to upload images outside webapp ? For example, in shared ressources under OpenLiberty.
ZK 9.5.0.2, CKEditor 4.14.0.1.
Regards.
By default, it only uploads to a folder inside a web application because a web application can only access the folders under its web context root. When you undeploy a web application, it's expected that the server will remove all its subfolder including your image uploading folder.
To store the uploaded images to a folder out of web context root, you need to implement your own org.zkforge.ckez.CkezFileWriter
and assign it by
((CKeditor)comp).setFileWriter(new MyCkezFileWriter("/mydisk/upload"));
Then you might also need a custom image browser template because you need to browse a folder out of web context root. You can reference the default one below to write your own:
ckez-4.14.0.1.jar/web/ckez/html/browse.zul
And specify your template path:
<ckeditor fileBrowserTemplate="fileBrowser.zul"/>
You also need a servlet to handle the image URL after inserting an image.
If you need dedicated support, please contact [email protected].
Asked: 2021-05-10 16:02:27 +0800
Seen: 6 times
Last updated: May 13 '21