How to Upload to 0x0.st

2021-06-01


0x0.st is what I can only describe as the "suckless" way of sharing files. It doesn't have any fancy GUI frontend, but you can HTTP POST files using curl -F on the command line. This not only makes it a seriously useful tool in shell scripts, but it's just generally a useful tool.

Basic Usage

0x0.st has a description of how to use it on its homepage. Here's an excerpt:

HTTP POST files here:
    curl -F'file=@yourfile.png' http://0x0.st
You can also POST remote URLs:
    curl -F'url=http://example.com/image.jpg' http://0x0.st
Or you can shorten URLs:
    curl -F'shorten=http://example.com/some/long/url' http://0x0.st

So, to upload "file.png" to 0x0.st, you can write curl -F'file=@file.png' 0x0.st. You could also use a script I wrote called 0x0, which can handle multiple file uploads and generally makes things easier. The script is available here, and you can run these commands in terminal to install it.

curl https://spitemim.xyz/scripts/0x0 > ~/.local/bin/0x0
chmod +x ~/.local/bin/0x0

The script is invoked like this:

0x0 file.png file2.jpg

It's an extremely simple feat to write your own script in your language of choice, however, so I recommend doing that before using the one I wote.