html5 - get image blob after using sanitizer angular2 -


i'm using angular2 dom sanitizer read image file. want upload file firebase storage. however, unable find way convert sanitized image blob or can uploaded.

readimage2(inputvalue: any): observable<any> {     var file:file = inputvalue.files[0];     return this.ng2imgmaxservice.compress([file], this.maximagesize).mergemap( (result) => {       const compressedimage = window.url.createobjecturl(result);       const compressedimagetrusted=this.sanitizer.bypasssecuritytrusturl(compressedimage);       return observable.create((observer) => {           observer.next({imageurl: compressedimagetrusted});       })   }) } 

in code, want upload compressedimagetrusted file firebase storage. file has type safeurlimplwhich i'm not sure how convert can upload firebase storage. appreciated.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -