From 5145c70cf42b0facef29f9cbadfac1fedeab2d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=BCnk=C3=B6sd=20Marcell?= Date: Wed, 25 Mar 2020 04:06:41 +0100 Subject: [PATCH] removed thing --- multiparttest.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/multiparttest.py b/multiparttest.py index 053ee99..a194b27 100644 --- a/multiparttest.py +++ b/multiparttest.py @@ -4,15 +4,14 @@ import os.path import json FILE = '/home/marcsello/CommonStarling_102761_45.wav' -TAG = 'nigga' +TAG = 'test' -#(filename, data, content_type, headers) -#{'file': ('report.xls', open('report.xls', 'rb'), 'application/vnd.ms-excel', {'Expires': '0'})} +# Files structure: (filename, data, content_type, headers) files = { - "soundFile": (os.path.basename(FILE),open(FILE,'rb').read(),'audio/wave',{'Content-length' : os.path.getsize(FILE)}), - "description" : (None, json.dumps({'tag' : TAG}),"application/json") + "soundFile": (os.path.basename(FILE), open(FILE,'rb').read(), 'audio/wave', {'Content-length' : os.path.getsize(FILE)}), + "description" : (None, json.dumps({'tag' : TAG}), "application/json") } -r = requests.post('http://localhost:5000/object',files=files) +r = requests.post('http://localhost:5000/object', files=files) r.raise_for_status()