Error when pasting image with CTRL + V FROALA

Viewed 491

I started the basic version of Froala with version 4, the problem is that if I paste an image with CTRL + v, it does not appear in the editor because it presents a message that is "Image file type is invalid", but if I use the image icon it uploads without problems and remains visible in the editor. How can I fix it?

Preview error message

This is my code

<script>
  new FroalaEditor('#description',{
   toolbarButtons: ['bold', 'italic', 'underline', 'fontFamily', 'color','paragraphFormat', 'align', 'formatOL', 'formatUL', 'outdent', 'indent','insertImage','insertTable','|', 'undo', 'redo'],
   imageInsertButtons: ['imageBack', '|', 'imageUpload'],
   quickInsertTags: [],
   language: 'es',
   attribution: false,
   charCounterCount: false,
   imageUploadURL: '/upload_files',
   imageUploadParams: {
         _token: "{{ csrf_token() }}",
        id: '{{$model->id}}'
      }
  });
</script>
2 Answers

The problem we detected was its a different file type when copy/pasted. If you paste a png file - it will be image/png;base64. Allowing png;base64 in allowed image file types imageAllowedTypes sends the request to server but then its upto the server to handle that as well.

Related