Ch.8.22 Saving Images to Firebase Storage w/a Cloud Firestore Reference

Published: 26 July 2020
on channel: Prof. John Gallaugher
3,584
58

We'll add an essential full-stack skill in this Swift/iOS tutorial as we learn to not only save an image to Google Firebase Storage, but also how to save a reference to a Cloud Firestore Database so our app will be able to later access and display this image. We'll cover the structure of Firebase Storage file paths, we'll create a structure to keep track of Firebase Storage images using Cloud Firestore. We'll show basic code to save to Firebase Storage, as well as how to extend it to also save a database reference to the saved file. As always, expect much enthusiasm in this tutorial video. Part of Prof. Gallaugher's Zero-to-Full-Stack University Course. For more info, see https://gallaugher.com/swift
---
Small update that doesn't impact the code: The video showed an error line reporting the ref as metaData. It should report any erroneous ref as storageRef, as shown below:
print("😡 ERROR: upload for ref \(storageRef) failed. \(error.localizedDescription)")
It won't impact the execution of your code, but if you ever reuse this code & run into an error, you'll likely want the storageRef to show instead of metaData.


Watch video Ch.8.22 Saving Images to Firebase Storage w/a Cloud Firestore Reference online without registration, duration hours minute second in high quality. This video was added by user Prof. John Gallaugher 26 July 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3,584 once and liked it 58 people.