from picamera import PiCamera
from time import sleep
import sys 
import requests

camera = PiCamera()

camera.stop_preview()
sleep(1)
print("3")
sys.stdout.flush()
sleep(1)
print("2")
sys.stdout.flush()
sleep(1)
print("1")
sys.stdout.flush()
sleep(1)
camera.capture('/home/pi/piserver_me/public/body.jpg')

url = 'http://13.124.65.48:3000/user/bodypic/'+sys.argv[1]
files = {'image':open('/home/pi/piserver_me/public/body.jpg','rb')}
r = requests.post(url,files=files)
print(r.text)


ef5e6a2a7b690b8d24d0d8509c26480eb78a5c78
<mask token>

<mask token>
camera.stop_preview()
sleep(1)
print('3')
sys.stdout.flush()
sleep(1)
print('2')
sys.stdout.flush()
sleep(1)
print('1')
sys.stdout.flush()
sleep(1)
camera.capture('/home/pi/piserver_me/public/body.jpg')
<mask token>
print(r.text)

<mask token>
camera = PiCamera()
camera.stop_preview()
sleep(1)
print('3')
sys.stdout.flush()
sleep(1)
print('2')
sys.stdout.flush()
sleep(1)
print('1')
sys.stdout.flush()
sleep(1)
camera.capture('/home/pi/piserver_me/public/body.jpg')
url = 'http://13.124.65.48:3000/user/bodypic/' + sys.argv[1]
files = {'image': open('/home/pi/piserver_me/public/body.jpg', 'rb')}
r = requests.post(url, files=files)
print(r.text)

from picamera import PiCamera
from time import sleep
import sys
import requests
camera = PiCamera()
camera.stop_preview()
sleep(1)
print('3')
sys.stdout.flush()
sleep(1)
print('2')
sys.stdout.flush()
sleep(1)
print('1')
sys.stdout.flush()
sleep(1)
camera.capture('/home/pi/piserver_me/public/body.jpg')
url = 'http://13.124.65.48:3000/user/bodypic/' + sys.argv[1]
files = {'image': open('/home/pi/piserver_me/public/body.jpg', 'rb')}
r = requests.post(url, files=files)
print(r.text)

from picamera import PiCamera
from time import sleep
import sys 
import requests

camera = PiCamera()

camera.stop_preview()
sleep(1)
print("3")
sys.stdout.flush()
sleep(1)
print("2")
sys.stdout.flush()
sleep(1)
print("1")
sys.stdout.flush()
sleep(1)
camera.capture('/home/pi/piserver_me/public/body.jpg')

url = 'http://13.124.65.48:3000/user/bodypic/'+sys.argv[1]
files = {'image':open('/home/pi/piserver_me/public/body.jpg','rb')}
r = requests.post(url,files=files)
print(r.text)

