aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorEmil Williams2025-07-06 20:09:59 +0000
committerEmil Williams2025-07-06 20:09:59 +0000
commit6442beeee5afc99848870ba3a38938c1ef84bd27 (patch)
treed36836012c88a1d431ac894daf36f26db94ff337 /index.html
parentd92d6db6e5cab353ea04fa80a25c0d084e1220ff (diff)
downloademil-up.chud.cyou-6442beeee5afc99848870ba3a38938c1ef84bd27.tar.xz
emil-up.chud.cyou-6442beeee5afc99848870ba3a38938c1ef84bd27.tar.zst
--
Diffstat (limited to 'index.html')
-rw-r--r--index.html13
1 files changed, 12 insertions, 1 deletions
diff --git a/index.html b/index.html
index fdadd87..404b639 100644
--- a/index.html
+++ b/index.html
@@ -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.