diff options
| author | Emil Williams | 2025-07-06 20:09:59 +0000 |
|---|---|---|
| committer | Emil Williams | 2025-07-06 20:09:59 +0000 |
| commit | 6442beeee5afc99848870ba3a38938c1ef84bd27 (patch) | |
| tree | d36836012c88a1d431ac894daf36f26db94ff337 | |
| parent | d92d6db6e5cab353ea04fa80a25c0d084e1220ff (diff) | |
| download | emil-up.chud.cyou-6442beeee5afc99848870ba3a38938c1ef84bd27.tar.xz emil-up.chud.cyou-6442beeee5afc99848870ba3a38938c1ef84bd27.tar.zst | |
--
| -rw-r--r-- | config.el | 14 | ||||
| -rw-r--r-- | index.html | 13 |
2 files changed, 23 insertions, 4 deletions
@@ -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 @@ -14,4 +16,10 @@ (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. + ) @@ -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> @@ -25,6 +25,17 @@ 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. |
