diff options
Diffstat (limited to 'index.html')
| -rw-r--r-- | index.html | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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. |
