Alex-D / Trumbowyg

A lightweight and amazing WYSIWYG JavaScript editor under 10kB
https://alex-d.github.io/Trumbowyg
MIT License
4.02k stars 614 forks source link

Not receiving image data in POST fileFieldName #1262

Closed sptaule closed 2 years ago

sptaule commented 2 years ago

Hello, thank you for the amazing rich editor!

I would like to use the upload plugin in order to upload image with PHP on the server. I followed the documentation but end up with the "alt" field only (see dump($_POST) below) :

array:1 [
  "alt" => "Image description !"
]

My upload config looks like this :

plugins: {
    upload: {
        serverPath: "<?= EDITOR_IMAGE_UPLOAD; ?>",
        fileFieldName: 'image'
    }
}

I can't find where I am mistaking.. thanks !

sptaule commented 2 years ago

Well, the author of this post is not proud of himself but at least he learnt that image can be retrieved with FILES and not POST.. !