Hello everybody,
I'm working with CKEditor and I have the following problem.
In order to insert an image on my local machine into the text editor, I need first to upload the image to the server, then get back its url.
As I'm working with Java Servlet, my code is as follow :
CKEDITOR.replace(this.rteid, {
filebrowserImageBrowseUrl : '/ckfinder/ckfinder.html?Type=Images',
filebrowserImageUploadUrl : 'TransfertServlet'
});
it means when I click the button "Upload it to server", the Java Servlet named "TransfertServlet" is called.
My question is : how can i send back the url of the image so that I can insert it to my text ?
Thank you for your help !
Gia
I'm working with CKEditor and I have the following problem.
In order to insert an image on my local machine into the text editor, I need first to upload the image to the server, then get back its url.
As I'm working with Java Servlet, my code is as follow :
CKEDITOR.replace(this.rteid, {
filebrowserImageBrowseUrl : '/ckfinder/ckfinder.html?Type=Images',
filebrowserImageUploadUrl : 'TransfertServlet'
});
it means when I click the button "Upload it to server", the Java Servlet named "TransfertServlet" is called.
My question is : how can i send back the url of the image so that I can insert it to my text ?
Thank you for your help !
Gia

Re: Get Url of a file uploaded by a Java Servlet
// Helper function to get parameters from the query string. function getUrlParam(paramName) { var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i') ; var match = window.location.search.match(reParam) ; return (match && match.length > 1) ? match[1] : '' ; } var funcNum = getUrlParam('CKEditorFuncNum'); var fileUrl = '/path/to/file.txt'; window.opener.CKEDITOR.tools.callFunction(funcNum, fileUrl); //http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_%28Uploader%29/Custom_File_Browser
Re: Get Url of a file uploaded by a Java Servlet
Re: Get Url of a file uploaded by a Java Servlet