This commit is contained in:
parent
922d22c07d
commit
5b8f8cc108
@ -77,6 +77,7 @@ class InputServiceServer {
|
||||
is PartData.FormItem -> {
|
||||
if (part.name == "description") {
|
||||
val gson = Gson()
|
||||
print(part.value)
|
||||
description = gson.fromJson(part.value, SampleObject::class.java)
|
||||
}
|
||||
}
|
||||
|
2
test.py
2
test.py
@ -10,7 +10,7 @@ FILE = 'CommonStarling_102761_45.wav'
|
||||
|
||||
files = {
|
||||
"file": (os.path.basename(FILE), open(FILE,'rb').read(), 'audio/wave', {'Content-length' : os.path.getsize(FILE)}),
|
||||
"description" : (None, json.dumps({'date' : datetime.now().isoformat(), 'device_id' : '123'}), "application/json")
|
||||
"description" : (None, json.dumps({"date" : datetime.now().isoformat(), "device_id" : "123"}), "application/json")
|
||||
}
|
||||
|
||||
r = requests.post(URL,files=files)
|
||||
|
Loading…
Reference in New Issue
Block a user