substance / notes

Real-time collaborative notes editing.
Other
21 stars 5 forks source link

File upload #14

Closed Integral closed 8 years ago

Integral commented 8 years ago

@michael you can try smth like var xhr = new XMLHttpRequest(); xhr.open('post', '/api/upload', true); xhr.upload.onprogress = function(e) { if (e.lengthComputable) { var percentage = (e.loaded / e.total) * 100; $('div.progress div.bar').css('width', percentage + '%'); } }; xhr.onerror = function(e) { }; xhr.onload = function() { }; xhr.send(figure);

Integral commented 8 years ago

and you must provide 'figure' field, otherwise it will return error

michael commented 8 years ago

This should not break any existing functionality right?

michael commented 8 years ago

Feel free to merge into master.. the earlier the better. Just it should not break things.