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

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -

spring - If .antMatcher is the first method after http then default login gives 404 but why? -