Support image upload plugin for CKEditor5

Created on 28 August 2023, about 1 year ago
Updated 3 July 2024, 5 months ago

Problem/Motivation

CKEditor5 is in core and provides the Image plugin. The image plugin supports inline uploads however the way that this functions is not compatible with the current ClamAV file_validate hook implementation. The file is stored in the tmp directory until all validations are completed. The file object is given a URI of the eventual location and this does not exist when we try to fopen to stream to Clam.

The file objects filesize is calculated from the tmp location and is working as expected in my tests.

Steps to reproduce

  • /admin/config/content/formats select a text format
  • Enable the image plugin and configure allow uploads
  • Try to upload an image via the CKEditor plugin

Proposed resolution

  • Access the current request and load the file from the request object

Remaining tasks

Testing.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇦🇺Australia steveworley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024