Various coding and commeting tidy-up

This commit is contained in:
Ray 2024-01-02 07:26:44 +00:00 committed by GitHub
parent 2753aee30f
commit 8e022e9b44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ export function MyForm(props) {
event.preventDefault()
let unbasedData = { submitter, date, context };
// Handle file upload
// Handle file uploading to Firebase Storage
if (fileupload) {
const uploadTask = uploadBytesResumable(storageRef, fileupload);
@ -69,7 +69,7 @@ export function MyForm(props) {
// Get the download URL after the upload is complete
const fileUrl = await getDownloadURL(uploadTask.snapshot.ref);
// Add the file URL to the form submission
// Add the file URL to the form submission in Firestore along with other variables under the collection "unbasedtakes" with variable named "fileURL"
unbasedData.fileUrl = fileUrl;
});
}