orionjs / orioncms

[Old] Orion is an open source framework built on Meteor that makes complex as well as simple apps possible with minimal effort.
http://orionjs.org
MIT License
715 stars 129 forks source link

Summernote image upload #359

Closed alexchetv closed 8 years ago

alexchetv commented 8 years ago

The summernote onImageUpload callback signature was changed, so we need modify orion/packages/summernote/summernote.js:

     onImageUpload: function(files) {
      var upload = orion.filesystem.upload({
        fileList: files,
        name: files[0].name,
        uploader: 'summernote'
      });
      Session.set('orionSummernoteIsUploading', true);
      Session.set('orionSummernoteProgress', 0);
      Tracker.autorun(function () {
        if (upload.ready()) {
          if (upload.error) {
            console.log(upload.error);
            alert(upload.error.reason);
          } else {
            //editor.insertImage($editable, upload.url);
              element.summernote("insertImage", upload.url);
          }
          Session.set('orionSummernoteIsUploading', false);
        }
      });
      Tracker.autorun(function () {
        Session.set('orionSummernoteProgress', upload.progress());
      });
    }
mhammerc commented 8 years ago

Got the bug too :)

swehedgehog commented 8 years ago

Same here...

mhammerc commented 8 years ago

My PR has been merged so I think we can close the issue, the bug should be resolved :)