Cannot get uploaded image downloadURL?


I am trying to upload image to firebase. I can successfully upload the image . But the problem is i cannot get the uploaded image’s url. because the promise takes longer and my data passes to the db faster than the image;s url response. here is my code:

	post_news(form: NgForm){
		this.title = form.value.title;
		this.content = form.value.content;
		this.category = form.value.category;
		if(this.capturedimage1 !== ''){
			//console.log('captured image is not empty');
		let storageRef =;
		const filename = Math.floor( / 1000);
		const imageRef = storageRef.child(`images/${filename}.jpg`);
			this.imageref1 = data.downloadURL;
			let alert = this.alertCtrl.create({
				title: 'uploadedimage',
				subTitle: data.downloadURL,
				buttons: ['dismiss']
		console.log(this.imageref1) -->this returns empty string...but the image is uploaded to firebase. 

based on my google search…they say this is a promise and it is asynchronous(will not wait till it get the response) . if that’s the case how can i get the uploaded image’s downloadURL.