feat(bin): add 0x0 upload script in Nim!
Anirudh icyph0x@pm.me
Fri, 01 Jun 2018 14:41:37 +0530
1 files changed,
17 insertions(+),
0 deletions(-)
jump to
A
bin/oxo.nim
@@ -0,0 +1,17 @@
+#!/usr/bin/env nimcr + +import httpclient +import os +import strformat + +var client = newHttpClient() +var data = newMultipartData() + +try: + var file = paramStr(1) + data.addFiles({"file": fmt"{file}"}) + let url = "http://0x0.st" + echo client.postContent(url, multipart=data) +except IndexError: + echo "no file specified :v" + quit(1)