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 safeurlimpl
which i'm not sure how convert can upload firebase storage. appreciated.
Comments
Post a Comment