Add client
This commit is contained in:
parent
4a17e2feb9
commit
9e98336d10
|
@ -0,0 +1,15 @@
|
||||||
|
from watchgod import watch
|
||||||
|
from printer import printer
|
||||||
|
import requests
|
||||||
|
|
||||||
|
base = "./"
|
||||||
|
def main():
|
||||||
|
for changes in watch('./images'):
|
||||||
|
print(changes)
|
||||||
|
for change in changes:
|
||||||
|
url = 'http://127.0.0.1:8000/upload'
|
||||||
|
file = {'file': open(change[1], 'rb')}
|
||||||
|
resp = requests.post(url=url, files=file)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
Loading…
Reference in New Issue