import httpclient, os, strutils, asyncdispatch

var c = newAsyncHttpClient()
var d = newMultipartData()

proc uploader() {.async.} =
    const base = "/home/derekdai/Photos"
    for p in base.walkDirRec():
        let (_, f) = p.splitPath()
        echo f

        d.addFiles({f: p})

    echo await c.postContent("https://telegra.ph/upload", multipart=d)

waitFor uploader()