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

What is happening when Matlab is starting a "parallel pool"? -

php - Cannot override Laravel Spark authentication with own implementation -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -