angular - angular2 upload a safeUrl(using domSanitizer) image to firebase storage -


i'm reading image file , wanted upload firebase storage. i'm using function read image data:

readimage2(inputvalue: any): observable<any> {     var file:file = inputvalue.files[0];     const objecturl = window.url.createobjecturl(file);     var myobs = observable.create((observer) => {         observer.next({imageurl: this.sanitizer.bypasssecuritytrusturl(objecturl)})     })     return myobs } 

then, i'm using tostring() method on imageurl convert string , using

firebase.storage().ref(`images/${this.guid()}`).putstring(image) 

to upload image. however, uploads string value not image. how convert safeurl obtained after using sanitizer blob or can upload firebase?


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 -