]> git.xolatile.top Git - emil-up.chud.cyou.git/commitdiff
--
authorEmil Williams <emilemilemil@cock.li>
Sun, 6 Jul 2025 20:09:59 +0000 (20:09 +0000)
committerEmil Williams <emilemilemil@cock.li>
Sun, 6 Jul 2025 20:09:59 +0000 (20:09 +0000)
config.el
index.html

index bfb191873db219b09935e69ae62085cbad5de22c..1a96f8c136f18586a12b7f5e34cb4f63d36cff3f 100644 (file)
--- a/config.el
+++ b/config.el
@@ -1,6 +1,8 @@
-(use-package 0x0 :straight t)
-
 (custom-set-variables
+ ;; custom-set-variables was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
  '(0x0-default-server 'chud)
  '(0x0-servers
    '((0x0 :scheme "https" :host "0x0.st" :default-dir "~/" :curl-args-fun 0x0--make-0x0-curl-args :min-age 30 :max-age 365
      (x0 :scheme "https" :host "x0.at" :default-dir "~/" :curl-args-fun 0x0--make-0x0-curl-args :min-age 3
                :max-age 100 :max-size 536870912)
      (chud :scheme "https" :host "up.chud.cyou" :default-dir "~/" :curl-args-fun 0x0--make-0x0-curl-args :min-age 28
-           :max-age 28 :max-size 104857600))))
+           :max-age 28 :max-size 104857600)))))
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ )
index fdadd8792a0658fea6f5b750e5252826f7198678..404b639ad3fb1cb18f316d8deb3ff90bf11bae41 100644 (file)
@@ -10,7 +10,7 @@
   </head>
   <body>
     <div style="width: 50em;">
-      <form action="https://up.chud.cyou/upchud.tcl" method="post" enctype="multipart/form-data">
+      <form action="https://up.chud.cyou/" method="post" enctype="multipart/form-data">
         <fieldset>
           <legend>Upload a file</legend>
           <label>
 curl https://up.chud.cyou --upload-file 'file'
 # alternatively
 curl https://up.chud.cyou -F'file=@file'
+# as a shell function
+upload(){
+    url="$1"
+    shift
+    if [ -z "$@" ] ; then curl "$url" -F"file=@/dev/stdin"; fi
+    for i in "$@"; do
+        if [ "$i" = "-" ]; then i="/dev/stdin" ; fi
+        curl "$url" -F"file=@$i"
+    done
+}
+chud(){ upload "https://up.chud.cyou" "$@" ; }
       </pre>
       <p>
         Files are wiped monthly and may not be larger than 100 mebibytes.