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

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -