removed thing
This commit is contained in:
parent
33311e752a
commit
5145c70cf4
@ -4,15 +4,14 @@ import os.path
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
FILE = '/home/marcsello/CommonStarling_102761_45.wav'
|
FILE = '/home/marcsello/CommonStarling_102761_45.wav'
|
||||||
TAG = 'nigga'
|
TAG = 'test'
|
||||||
|
|
||||||
#(filename, data, content_type, headers)
|
# Files structure: (filename, data, content_type, headers)
|
||||||
#{'file': ('report.xls', open('report.xls', 'rb'), 'application/vnd.ms-excel', {'Expires': '0'})}
|
|
||||||
|
|
||||||
files = {
|
files = {
|
||||||
"soundFile": (os.path.basename(FILE),open(FILE,'rb').read(),'audio/wave',{'Content-length' : os.path.getsize(FILE)}),
|
"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")
|
"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()
|
r.raise_for_status()
|
||||||
|
Loading…
Reference in New Issue
Block a user