Skip to content

Commit

Permalink
u[dated
Browse files Browse the repository at this point in the history
  • Loading branch information
codecrew-qes committed Aug 19, 2023
1 parent 8a9a363 commit 5506829
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions photography.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
property="og:image"
content="https://assets.thehansindia.com/h-upload/2021/07/08/1087103-photographer.jpg"
/>
<link rel="icon" type="image/png" href="logo.png">
<link rel="icon" type="image/png" href="logo.png" />
<style>
@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap");
body {
Expand Down Expand Up @@ -214,15 +214,23 @@ <h1>Photography Day Competition</h1>
(snapshot) => {
const progress =
(snapshot.bytesTransferred / snapshot.totalBytes) * 100;
uploadProgress.value = progress;
if (uploadProgress) {
uploadProgress.value = progress;
} else {
console.error("uploadProgress element not found.");
}
},
(error) => {
console.error("Upload Error:", error);
window.alert("Upload failed. Please try again.");
},
async () => {
console.log("Upload Complete");
uploadProgress.value = 0;
if (uploadProgress) {
uploadProgress.value = 0;
} else {
console.error("uploadProgress element not found.");
}

// Get the download URL of the uploaded image
const downloadURL = await imageRef.getDownloadURL();
Expand All @@ -247,7 +255,8 @@ <h1>Photography Day Competition</h1>
console.log("Entry stored in the Realtime Database");
window.alert("Upload successful!");
// Redirect to a new window or URL
window.location.href = "https://codecrew-qes.github.io/codecrew/";
window.location.href =
"https://codecrew-qes.github.io/codecrew/";
}
}
);
Expand Down

0 comments on commit 5506829

Please sign in to comment.