14 lines
239 B
Python
14 lines
239 B
Python
import requests
|
|
import sys
|
|
import pyperclip
|
|
|
|
URL = 'http://localhost:5000/uploadcli'
|
|
|
|
file = {'file': open(sys.argv[1], 'rb')}
|
|
r = requests.post(URL, files=file)
|
|
|
|
if r.status_code == 200:
|
|
pyperclip.copy(r.text)
|
|
else:
|
|
print(r.text)
|