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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -