steveathon / bootstrap-wysiwyg

Tiny bootstrap-compatible WYSIWYG rich text editor
MIT License
661 stars 1.71k forks source link

How can I save the uploaded image to php server? #63

Closed Palazi closed 8 years ago

Palazi commented 8 years ago

I cant figure out , How I can save the uploaded image to php server

codewithtyler commented 8 years ago

You should be able to use a jQuery selector to grab any images that have been added to the editor's div then copy that to the server. Once you get the images selected it's just a matter of copying the files to the destination folder on your server. In my senior level independent study I created an upload function that copied files to the server. You can see that function here.

steveathon commented 8 years ago

There is a php example here: https://github.com/steveathon/bootstrap-wysiwyg/blob/master/examples/form-post.html and https://github.com/steveathon/bootstrap-wysiwyg/blob/master/examples/php/upload.php

Elements submit as post variables and you can then just decode them and store them. You can also further manipulate them using the PHP image libraries, if you wanted to.

steveathon commented 8 years ago

I'm going to close this as it's not a request, so to speak. Please feel free to add more comments if you still need some help.