{"action":"created","issue":{"url":"https://api.github.com/repos/Frontwise/grid-editor/issues/48","repository_url":"https://api.github.com/repos/Frontwise/grid-editor","labels_url":"https://api.github.com/repos/Frontwise/grid-editor/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/Frontwise/grid-editor/issues/48/comments","events_url":"https://api.github.com/repos/Frontwise/grid-editor/issues/48/events","html_url":"https://github.com/Frontwise/grid-editor/issues/48","id":211725283,"number":48,"title":"Save image on server instead of in database","user":{"login":"jakobjh","id":13592254,"avatar_url":"https://avatars2.githubusercontent.com/u/13592254?v=4","gravatar_id":"","url":"https://api.github.com/users/jakobjh","html_url":"https://github.com/jakobjh","followers_url":"https://api.github.com/users/jakobjh/followers","following_url":"https://api.github.com/users/jakobjh/following{/other_user}","gists_url":"https://api.github.com/users/jakobjh/gists{/gist_id}","starred_url":"https://api.github.com/users/jakobjh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakobjh/subscriptions","organizations_url":"https://api.github.com/users/jakobjh/orgs","repos_url":"https://api.github.com/users/jakobjh/repos","events_url":"https://api.github.com/users/jakobjh/events{/privacy}","received_events_url":"https://api.github.com/users/jakobjh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-03-03T15:50:03Z","updated_at":"2017-07-20T13:52:33Z","closed_at":"2017-03-03T16:50:48Z","body":"Hi. \r\nI am using your script together with Summernote and i need to upload image to a server instead of to a database. \r\nTherefore I use the inUploadImage function from Summernote. Its working fine in a \"clean\" summernote editor. But how can i implement that in the grid-editor? I guess I should use the config setting like this:\r\nconfig: {\r\n callbacks: {\r\n  onImageUpload: function(files, editor, $editable) {\r\n   sendFile(files[0],editor,$editable);\r\n  }  \r\n }\r\n}\r\nBut this is not working. Do you know a smart solution for that?\r\nThanks.\r\nJakob"},"comment":{"url":"https://api.github.com/repos/Frontwise/grid-editor/issues/comments/316709885","html_url":"https://github.com/Frontwise/grid-editor/issues/48#issuecomment-316709885","issue_url":"https://api.github.com/repos/Frontwise/grid-editor/issues/48","id":316709885,"user":{"login":"Xeronzz","id":13316316,"avatar_url":"https://avatars1.githubusercontent.com/u/13316316?v=4","gravatar_id":"","url":"https://api.github.com/users/Xeronzz","html_url":"https://github.com/Xeronzz","followers_url":"https://api.github.com/users/Xeronzz/followers","following_url":"https://api.github.com/users/Xeronzz/following{/other_user}","gists_url":"https://api.github.com/users/Xeronzz/gists{/gist_id}","starred_url":"https://api.github.com/users/Xeronzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xeronzz/subscriptions","organizations_url":"https://api.github.com/users/Xeronzz/orgs","repos_url":"https://api.github.com/users/Xeronzz/repos","events_url":"https://api.github.com/users/Xeronzz/events{/privacy}","received_events_url":"https://api.github.com/users/Xeronzz/received_events","type":"User","site_admin":false},"created_at":"2017-07-20T13:52:33Z","updated_at":"2017-07-20T13:52:33Z","body":"hey, for anyone still having this problem: I had the same exact problem with Summernote. In the end I've edited the jquery.grideditor.js file at the summernote area (around row 679).\r\n\r\nThere I added the callback:\r\nonImageUpload: function(files, editor, welEditable) {\r\n\t  data = new FormData();\r\n\t  data.append(\"file\", files[0]);\r\n\t  $.ajax({\r\n\t      data: data,\r\n\t      type: \"POST\",\r\n\t      url: \"/base/ajax/summernoteimg.php\",\r\n\t      cache: false,\r\n\t      contentType: false,\r\n\t      processData: false,\r\n\t      success: function(url) {\r\n\t          contentArea.summernote('insertImage', url);\r\n\t      }\r\n\t  });\r\n}\r\n\r\nAfter that it is uploading again and inserting the image like it should. Keep in mind I also updated Summernote, the old one had a different insertImage function."}}
{"actor":{"display_login":"Xeronzz"}}