mardi 27 octobre 2015

Froala 2.0 in Laravel5 image upload error

Using Froala editor in Laravel5 project. Have included all the .js and .css files to properly open the image toolbar plugin.

I can browse images that are already on my machine, but when I try to upload, it errors out with "Something went wrong. Please try again" which I am assuming is a canned response. I displayed the error thrown and it was connected to something went wrong during the upload.

Below is my script for calling the editor:

<script>
  $(function() {
    $('#body').froalaEditor({
        imageUploadURL: '/uploadpageimages/{!! $page->pgeID !!}',
        imageUploadParam: 'file',
        imageManagerLoadURL: '/viewpageimages/{!! $page->pgeID !!}',
        toolbarButtons: ['undo','|','bold','italic','underline','strikeThrough','subscript','superscript','|','paragraphFormat','align','formatOL','formatUL','indent','outdent','|','insertTable','-','fontFamily','fontSize','color','|','insertImage','insertLink','insertFile','insertVideo','|','html']
    })
  });
</script>  

Like I say, when I load the imageManager, all works fine, but when I try to upload, I am not even getting to my upload URL. I have set debugging stops within the code, but it never makes it there before the error is thrown.

Anyone work with Froala 2 in a php framework and have this working?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1idZL1g
via IFTTT

Aucun commentaire:

Enregistrer un commentaire