Skip to content

Commit

Permalink
Create index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
abhu89 authored Nov 5, 2024
0 parents commit c1c8847
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Password Protected File Access</title>
<style>
body { font-family: Arial, sans-serif; }
#fileLink { display: none; }
</style>
</head>
<body>
<h2>Enter Password to Access the File</h2>
<input type="password" id="passwordInput" placeholder="Enter Password">
<button onclick="checkPassword()">Submit</button>

<div id="fileLink">
<p>Access your file here: <a href="SIGNED_URL" target="_blank">Download File</a></p>
</div>

<script>
function checkPassword() {
const password = "PASSWORD"; // Set your password here
const userInput = document.getElementById("passwordInput").value;

if (userInput === password) {
document.getElementById("fileLink").style.display = "block";
} else {
alert("Incorrect password. Please try again.");
}
}
</script>
</body>
</html>

0 comments on commit c1c8847

Please sign in to comment.