Advertisement
osmarks

transfer.sh-CC

Jan 13th, 2020
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. local function upload(name, data)
  2.     print(http.post {
  3.         url = ("https://transfer.sh/upload/%s"):format(name),
  4.         method = "PUT",
  5.         body = data
  6.     }.readAll())
  7. end
  8.  
  9. local filename = ...
  10. local f = fs.open(filename, "r")
  11. local d = f.readAll()
  12. f.close()
  13. upload(filename, d)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement