removed thing

This commit is contained in:
Pünkösd Marcell 2020-03-25 04:06:41 +01:00
parent 33311e752a
commit 5145c70cf4
1 changed files with 5 additions and 6 deletions

View File

@ -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()