Upload Files to Cloud Storage

Upload files to Cloud Storage is similar to Save Data to Firestore Database.

First, we need to create a form with the help of Contact Form 7 or you can design your own custom form if you want.

// This form will create a path to "users" collection
// If you want to generate a random id, you can leave out the documentId
// if you append __public to the fileType, it will save the image with full URL from cloud storage

// The file will be uploaded to "wpImages/documentId/timestamp+filename" path under Storage

[hidden collectionName "users"]
[hidden documentId "1"]
[hidden databaseType "firestore"]
[hidden fileType "imageUrl__public,imageUrl2"]

Your Name (required) [text* your-name]

[file imageUrl limit:1mb filetypes:gif|png|jpg|jpeg]
[file imageUrl2 limit:1mb filetypes:gif|png|jpg|jpeg]

[submit "Upload File"]
Files are uploaded to wpImages/documentId path
// Don't forget the html_id when you put the shortcode to the page

[contact-form-7 id="248" html_id="if-create-data-form" title="File Uploader"]