36
Views
4
Comments
Solved
[CKEditor.Reactive] Why is CKEditor not downloading files with the proper file type?
ckeditor-reactive
Reactive icon
Forge asset by Fábio Fantato

I’m testing the CKEditor Demo, and I noticed that it allows file uploads, which is great for me. I tested uploading a PDF and an XLS file, but when I tried to download them, they were saved with the name 'download' and as a generic file type, making it impossible to open them as a PDF. I’m new to this, so I’m probably missing an important step. 

CKEditorReactiveDemo.oml
UserImage.jpg
Emanuel Pereira
Solution

I Found the solution.
We have to add the headers on Api download.


UserImage.jpg
Tran Manh Dung
Solution

You need to add the following content to the "Header" of API:

1. Content-Type

2. Content-Disposition

2025-03-11 05-02-41
Ragu Vasu

Hi @Emanuel Pereira 

Good Morning,

The PDF export feature collects HTML from editor.getData() and applies default and custom styles before sending it to CKEditor Cloud Services for conversion. Please check the HTML to PDF logs to ensure the DOM content is not empty or null. More details here: CKEditor PDF Export

UserImage.jpg
Emanuel Pereira

Hi @Ragu Vasu

I'm referring to an issue where, after uploading a file and then downloading it via a link, the file name and type are not working as expected. I mistakenly marked this as solved, but that was a misclick. My intention wasn’t to extract all the information to a PDF but rather to attach the files.

E.G.:
     1. First step you choose the file and then you click send it to the server!

     2. O choose the display test and the link will generate automatic 


       3. This is what the user will see 


4. When the user click on download it's suppose to download the file but just download a correct file but without a correct type because if i open i can see that its just missing the type file.


Thank you for your assistance!

UserImage.jpg
Emanuel Pereira
Solution

I Found the solution.
We have to add the headers on Api download.


UserImage.jpg
Tran Manh Dung
Solution

You need to add the following content to the "Header" of API:

1. Content-Type

2. Content-Disposition

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.