-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
197 lines (177 loc) Β· 8.62 KB
/
index.html
File metadata and controls
197 lines (177 loc) Β· 8.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE html>
<html lang="en">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8221572138691991"
crossorigin="anonymous"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-format="fluid"
data-ad-layout-key="-fb+5w+4e-db+86"
data-ad-client="ca-pub-8221572138691991"
data-ad-slot="8068868763"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<head>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8221572138691991"
crossorigin="anonymous"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-format="fluid"
data-ad-layout-key="-fb+5w+4e-db+86"
data-ad-client="ca-pub-8221572138691991"
data-ad-slot="8068868763"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TYFT2RP0SQ"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-TYFT2RP0SQ');
</script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8221572138691991"
crossorigin="anonymous"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Public File Storage</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body { background: linear-gradient(135deg, #1f1c2c, #928dab); color: white; text-align: center; padding: 50px; font-family: Arial, sans-serif; transition: 0.3s; }
.storage-box { max-width: 600px; margin: auto; background: rgba(0, 0, 0, 0.8); padding: 20px; border-radius: 10px; box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.2); }
input, select, textarea, button { margin-top: 10px; }
.animated-button { background: linear-gradient(45deg, #ff416c, #ff4b2b); border: none; padding: 10px 20px; font-size: 18px; border-radius: 5px; transition: 0.3s; cursor: pointer; width: 100%; }
.animated-button:hover { transform: scale(1.1); background: linear-gradient(45deg, #ff4b2b, #ff416c); }
#preview { max-width: 100px; display: none; border-radius: 5px; margin-top: 10px; }
.progress { display: none; height: 5px; margin-top: 10px; }
.drag-area { border: 2px dashed white; padding: 20px; cursor: pointer; margin-top: 10px; transition: 0.3s; }
.drag-area:hover { background: rgba(255, 255, 255, 0.1); }
#recent-uploads { margin-top: 20px; }
.dark-mode { background: #222; color: #ddd; }
</style>
</head>
<body>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8221572138691991"
crossorigin="anonymous"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-format="fluid"
data-ad-layout-key="-fb+5w+4e-db+86"
data-ad-client="ca-pub-8221572138691991"
data-ad-slot="8068868763"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8221572138691991"
crossorigin="anonymous"></script>
<!-- Hanzla Baig -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-8221572138691991"
data-ad-slot="3302523598"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<button class="btn btn-secondary" id="toggle-dark">π Dark Mode</button>
<div class="storage-box">
<h2>π Public File Storage</h2>
<input type="text" id="username" class="form-control" placeholder="Enter your name">
<input type="email" id="email" class="form-control" placeholder="Enter your email">
<select id="category" class="form-control">
<option value="Image">Image</option>
<option value="Video">Video</option>
<option value="Document">Document</option>
<option value="Other">Other</option>
</select>
<textarea id="description" class="form-control" placeholder="Enter file description"></textarea>
<input type="text" id="tags" class="form-control" placeholder="Enter tags (comma-separated)">
<select id="privacy" class="form-control">
<option value="Public">Public</option>
<option value="Private">Private</option>
</select>
<div class="drag-area" id="drag-area">π Drag & Drop File Here</div>
<input type="file" id="file" class="form-control">
<img id="preview" />
<div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" style="width: 0%;"></div>
</div>
<button class="animated-button" id="uploadBtn">Store File</button>
<p id="status"></p>
</div>
<div id="recent-uploads">
<h3>π Recent Uploads</h3>
<ul id="upload-list"></ul>
</div>
<script>
const WEBHOOK_URL = "https://discord.com/api/webhooks/1337612162679443530/CXMkDG4rSxyeYTLQNlsnN7bce5vRAVCzppM6fKJTnI_57Fn2H80dA1VuGklpskatB1Dt"; // Replace with your actual webhook URL
let uploadedFiles = [];
$("#toggle-dark").click(() => {
$("body").toggleClass("dark-mode");
});
$("#file").change(function() {
let file = this.files[0];
if (file && file.type.startsWith("image/")) {
let reader = new FileReader();
reader.onload = function(e) {
$("#preview").attr("src", e.target.result).show();
};
reader.readAsDataURL(file);
}
});
$("#drag-area").on("dragover", (e) => {
e.preventDefault();
$("#drag-area").css("background", "rgba(255,255,255,0.2)");
});
$("#drag-area").on("dragleave", () => {
$("#drag-area").css("background", "transparent");
});
$("#drag-area").on("drop", (e) => {
e.preventDefault();
$("#drag-area").css("background", "transparent");
let file = e.originalEvent.dataTransfer.files[0];
$("#file")[0].files = e.originalEvent.dataTransfer.files;
$("#preview").attr("src", URL.createObjectURL(file)).show();
});
$("#uploadBtn").click(async function() {
let username = $("#username").val().trim();
let email = $("#email").val().trim();
let category = $("#category").val();
let description = $("#description").val().trim();
let tags = $("#tags").val().trim();
let privacy = $("#privacy").val();
let file = $("#file")[0].files[0];
if (!username || !email || !file) {
$("#status").text("β Please fill all required fields.").css("color", "red");
return;
}
$(".progress").show();
$(".progress-bar").css("width", "50%");
let jsonPayload = {
username: "File Storage Bot",
content: `π **New File Uploaded**\nπ€ **Username:** ${username}\nπ§ **Email:** ${email}\nπ **Category:** ${category}\nπ **Description:** ${description}\nπ· **Tags:** ${tags}\nπ **Privacy:** ${privacy}`
};
let filePayload = new FormData();
filePayload.append("payload_json", JSON.stringify(jsonPayload));
filePayload.append("file", file);
try {
let response = await fetch(WEBHOOK_URL, { method: "POST", body: filePayload });
if (response.ok) {
$("#status").text("β
File stored successfully!").css("color", "green");
uploadedFiles.unshift(`${username}: ${file.name}`);
if (uploadedFiles.length > 5) uploadedFiles.pop();
$("#upload-list").html(uploadedFiles.map(f => `<li>${f}</li>`).join(""));
$(".progress-bar").css("width", "100%");
setTimeout(() => $(".progress").hide(), 2000);
} else throw new Error("Upload failed.");
} catch (error) {
$("#status").text("β Error storing file. Try again.").css("color", "red");
}
});
</script>
</body>
</html>