From 3438a6552f15ef3216b79b719265f480ccc54436 Mon Sep 17 00:00:00 2001
From: Volkor <me@volkor.me>
Date: Fri, 7 Jul 2023 23:38:51 +1000
Subject: [PATCH] fix: add example sharex config, and add /my_files url on main
 page

---
 src/main.rs                          | 1 +
 static/example.com.sxcu              | 9 +++++++++
 templates/localhost:8282/upload.html | 3 +++
 3 files changed, 13 insertions(+)
 create mode 100644 static/example.com.sxcu

diff --git a/src/main.rs b/src/main.rs
index 16d72a1..f16d774 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -135,6 +135,7 @@ async fn main() {
         .push(Router::with_path("/dmca").get(handlers::serve_static::serve_static))
         .push(Router::with_path("/welcome").get(handlers::serve_static::serve_static))
         .push(Router::with_path("/metrics").get(handlers::serve_metrics::serve_metrics))
+        // Might want to actually make a .ico instead of serving a webp image.
         .push(Router::with_path("/favicon.ico").get(StaticFile::new("static/favicon32.webp")))
         .push(Router::with_path("/robots.txt").get(StaticFile::new("static/robots.txt")))
         // Static File Serving
diff --git a/static/example.com.sxcu b/static/example.com.sxcu
new file mode 100644
index 0000000..8ed870a
--- /dev/null
+++ b/static/example.com.sxcu
@@ -0,0 +1,9 @@
+{
+  "Name": "example.com file uploader",
+  "DestinationType": "FileUploader",
+  "RequestURL": "https://example.com",
+  "FileFormName": "file",
+  "ResponseType": "Text",
+  "URL": "$json:url$",
+  "DeletionURL": "$json:deletionurl$"
+}
diff --git a/templates/localhost:8282/upload.html b/templates/localhost:8282/upload.html
index d6aba24..6f5819a 100644
--- a/templates/localhost:8282/upload.html
+++ b/templates/localhost:8282/upload.html
@@ -26,6 +26,9 @@
   <p class="note">This storage is not permanent, check the FAQ page for details<br>By uploading you agree to the ToS and
     Privacy Policy</p>
   <ul class="links">
+    <li>
+      <a href="/my_files">Your Files</a>
+    </li>
     <li>
       <a href="/services">Services</a>
     </li>
-- 
GitLab