upload canvas image using ng-file-upload $upload.upload -


i'm using camanjs in front end manipulate image want upload server. i'm having trouble creating html file object out of canvas object pass argument $upload.upload method. alternative can turn canvas image html tag i'm still stuck @ point of turning file. leads appreciated or alternative ways of doing this.

you can call

  this.render(function () {     ...     var b64data = this.tobase64();     var blob = b64toblob(b64data, contenttype);     upload.upload({file:blob, url:....})   }); 

for b64toblob function see: https://stackoverflow.com/a/16245768/1105011

alternatively can send base64 encoding of file server , convert file byte array on server different implementation depending on server using.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -