0๐
โ
// ...
data() {
image_url: ''
},
methods: {
var self = this;
createOrUpdateUser: function () {
//... your code
uploadTask.on('state_changed', function(snapshot){
}, function(error) {
// Handle unsuccessful uploads
}, function() {
// Handle successful uploads on complete
// For instance, get the download URL: https://firebasestorage.googleapis.com/...
uploadTask.snapshot.ref.getDownloadURL().then(function(downloadURL) {
//i need to pass downloadURL to the image_url variable above...
self.image_url = downloadURL
console.log('File available at', downloadURL);
});
});
}
}
๐คmark922
Source:stackexchange.com