diff --git a/.gitignore b/.gitignore index 0f574e4..6508e9a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ ### Python ### *__pycache__/ + +### Configs ### +camera/config.py +api/config.py diff --git a/camera/upload_img.py b/camera/upload_img.py index b9b3ed3..8fdcceb 100644 --- a/camera/upload_img.py +++ b/camera/upload_img.py @@ -20,7 +20,7 @@ else: try: start = time.time() img = {'image': open('latest.jpg', 'rb')} - response = requests.post(config.config['uploadurl'], files=img) + response = requests.post(config.config['uploadurl'], files=img, headers={'Authorization': 'Basic ' + config.config['key']}) end = time.time() except Exception as e: logging.info('Feil under opplasting: {0}'.format(e))