ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

"Take a photo" iOS functionality doesn't work with Image uploading process created on custom upload adapter.

Open sponsorenok opened this issue 1 year ago • 2 comments

Hi, I have Laravel app, where I created own plugin for CKEditor 5.

  1. Laravel
  2. Custom plugin with upload adapter

✔️ Expected result

Plugin receive image, send it to custom method in resource controller. Process image, and show thumbnail in ckeditor main area. For my plugin I created custom upload adapter, based on tutorial, with similar code.

❌ Actual result

All works properly, but when I try to use image from camera directly, using "Take a Photo" native iOS functionality, it doesn't work. In a word, nothing happened. I shoot a picture, approve it, window closed, nothing changed.

If I select image from gallery, all works properly.

📃 Other details

Here is the request in my upload adapter:

_initRequest() { const xhr = this.xhr = new XMLHttpRequest(); xhr.open( 'POST', '{{ route('images.storedzi') }}', true ); xhr.setRequestHeader('x-csrf-token', '{{ csrf_token() }}'); xhr.responseType = 'json'; }

  • Browser: Safari/Chrome
  • OS: iOS only. Win, Mac, Android - works properly
  • First affected CKEditor version: CKEditor 5
  • Installed CKEditor plugins:
  • Autoformat, BlockQuote, Bold, CloudServices, Essentials, GeneralHtmlSupport, Heading, Image, ImageCaption, ImageStyle, ImageToolbar, ImageUpload, Indent, Italic, Link, List, MediaEmbed, Mention, Paragraph, Zoomable*, FileRepository

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

sponsorenok avatar Apr 02 '24 14:04 sponsorenok

I’m experiencing an issue with the "take photo" feature, although I’m not sure if it’s related to another issue. My app is built with Angular, and I’m using a custom upload adapter.

The plugin works as expected when adding an image for the first time using the "take photo" feature. However, when taking a second photo, its thumbnail is overwritten by the thumbnail of the first photo after the upload completes. You can see the behavior in this video: https://github.com/user-attachments/assets/f0dad06a-e525-4982-90ba-cfe425f857cd.

This problem doesn’t occur when uploading photos from the gallery.

klscmms avatar Nov 28 '24 14:11 klscmms

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Nov 28 '25 23:11 CKEditorBot