CKEditor + KCEditor upload error - file-upload

I spent the whole day but was unable to find a solution.
I installed CKEditor and KCFinder, everything works fine except for one: when I want to upload a image from the "Browse Server" window file dosen't upload and result is "Unknow error".
When I upload from simple tag "Upload" the file is uploading but is not created a thumb and when I browse the server i can't see the thums of images, only icons of pic and name.
upload:
'uploadURL' => "http://domain.com/uploads/",
'uploadDir' => "../../../uploads/",
config:
CKEDITOR.config.filebrowserBrowseUrl = '<?=$GLOBALS['_st_']['urlTree']?>libraries/kcfinder/browse.php?opener=ckeditor&type=files';
CKEDITOR.config.filebrowserImageBrowseUrl = '<?=$GLOBALS['_st_']['urlTree']?>libraries/kcfinder/browse.php?opener=ckeditor&type=images';
CKEDITOR.config.filebrowserFlashBrowseUrl = '<?=$GLOBALS['_st_']['urlTree']?>libraries/kcfinder/browse.php?opener=ckeditor&type=flash';
CKEDITOR.config.filebrowserUploadUrl = '<?=$GLOBALS['_st_']['urlTree']?>libraries/kcfinder/upload.php?opener=ckeditor&type=files';
CKEDITOR.config.filebrowserImageUploadUrl = '<?=$GLOBALS['_st_']['urlTree']?>libraries/kcfinder/upload.php?opener=ckeditor&type=images';
CKEDITOR.config.filebrowserFlashUploadUrl = '<?=$GLOBALS['_st_']['urlTree']?>libraries/kcfinder/upload.php?opener=ckeditor&type=flash';
when: $GLOBALS['_st_']['urlTree'] is dinamic something like '../' in one or more steps

Related

how to upload a file with karate?

I know the question has already been asked, but I’m having trouble uploading a file with karate.
I have a file called "example.pdf" in my project. I put this document in a "assets" folder
I tried to build on the example of the documentation here.
https://github.com/karatelabs/karate/tree/master/karate-core#file-upload
and here’s my code:
* configure driver = { type: '#(driverType)', executable: '#(driverExecutable)', addOptions: #(driverOptions), headless: #(driverHeadless), webDriverSession: #(webDriverSession), showDriverLog: true }
Given waitFor('#upload)
And driver.inputFile('#upload', '../assets/pdf-exemple.pdf')
My browser is chrome
what am I missing ?
Thanks for your help
EDIT:
Thank you for your feedback, I’ll try to clarify.
Meanwhile I have some details. In fact the browser is chromedriver and geckodriver
const drivers = {
path: "./src/test/java/drivers/",
chromedriver: "95.0.4638.69",
geckodriver: "0.30.0",
};
So I think I have to use the approach "multipart file".
I tried this code, and my test passes without error, but does not handle the expected functionality (uploading an attachment)
And url 'https://url file file to upload/test' //page where is the area to upload a file
And waitFor(data.inputPJ).click() //area where you click on the application to upload a file
And multipart file file = { read: '../../assets/pdf-exemple.pdf', filename: '../../assets/pdf-exemple.pdf' }
And method post
But in my application this code has no effect, in the application I should have :
But the uploaded file doesn't appear, and I have:
The difficulty here is that I have no mistake. I will continue to try to understand the doc
I am at your disposal to provide more information

Cannot find module './img.jpg' after build in nuxtjs works on dev mode

Works fine on dev mode, after build get this below error when upload a new image then try to render image:
Error: Cannot find module './2019-10-16T21:50:32.958Zhotel-img.jpg'
Here is the method:
docImage(index) {
let imgPath = this.userDocs[index].document.documentPath;
imgPath = imgPath.substring(imgPath.indexOf("/") + 1);
return require(`../../uploads/${imgPath}`);
}
when upload a new image then try to render image:
Thats a reason. When you require images they are bundled by webpack at build time. So any image that isnt available at build time wont be available.

How can I add Font Awesome support to Ckeditor5?

I am trying to add Font Awesome support to Ckeditor5-inline and it just removes the "i" tags from HTML when I go in Edit mode.
First download font awesome if you haven't already then
1. Extract the downloaded file (fontawesome.zip) Copy the "fontawesome"
2. folder to "ckeditor/plugins/" folder Open the file
3. "ckeditor/config.js"
configure that like this and clear your browser's cache
config.extraPlugins = 'fontawesome';
config.contentsCss = 'path/to/your/font-awesome.css';
config.allowedContent = true;
In your HTML's section add this code:
<script>CKEDITOR.dtd.$removeEmpty['span'] = false;</script>
after that you can Use toolbargroupname: "FontAwesome" in your toolbar like this
config.toolbar = [
{ name: 'insert', items: [ 'FontAwesome', 'Source' ] }
];
as you commented your are using Django Integration in Django CMS
Django CMS enables adding text-based content to a site using CKEditor which is integrated through the module called djangocms_text_ckeditor. In that module is a static folder and settings.py file, which are setup in a manner that enables fully customizing CKEditor.
you can check here for Django Integration

Adobe Air load local HTML

When I load index.html from IDE it works fine!
But when I start compiled application it doesn't work.
The code:
_html = new HTMLLoader();
var fileURL:String = "app:/components/posteditor/ckeditor/index.html";
_html.load( new URLRequest(fileURL) );
I tried to load this file with
var fileURL:String = File.applicationDirectory.resolvePath("components/posteditor/ckeditor/index.html").nativePath;
but with no luck.
Looks like as Adobe's bug. Can you help me and advice?

Problem with using Uploadify

I have been trying to implement uploadify in my rails 3.1 app. And I followed the step mentioned here. And here is my code:
{my form code here}
- arr = []
- request.env['HTTP_COOKIE'].each_char{|c| arr.push(c[0].to_s)}
- #session = arr.join("x")
= #sermon_path = sermons_path
:javascript
$('#sermon_sermon').uploadify({
uploader: '/uploadify.swf',
script: '#{#sermon_path}',
cancelImg: 'cancel.png',
buttonText: 'Browse',
auto: true,
scriptData: { 'session_encoded': '#{#session}'}
})
This did showed uploadify button to select file to upload, but when the file is selected nothing happens. It doesn't even shows the uploaded file and no response is sent back to server.
Any help would be highly appreciated.
I newer use uploadify except in a php project but may be this other tutorial can help you. On github there is a working example and an other but with rails 2.3.4 or you can simply try this gem.