post request form now conforms
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
503ffe7f9a
commit
7abec4e257
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import logging
|
import logging
|
||||||
|
import json
|
||||||
from xeger import Xeger
|
from xeger import Xeger
|
||||||
from flask_restful import Resource
|
from flask_restful import Resource
|
||||||
from flask import request
|
from flask import request
|
||||||
@ -69,11 +70,12 @@ class SampleResource(Resource):
|
|||||||
requests.post(
|
requests.post(
|
||||||
f"http://{STORAGE_HOSTNAME}/object",
|
f"http://{STORAGE_HOSTNAME}/object",
|
||||||
files={
|
files={
|
||||||
'tag': (None, generated_tag),
|
'description': (None, json.dumps({'tag': generated_tag}), 'application/json'),
|
||||||
'file': (
|
'soundfile': (
|
||||||
'wave.wav',
|
'wave.wav',
|
||||||
soundfile,
|
soundfile,
|
||||||
soundfile.content_type)})
|
soundfile.content_type,
|
||||||
|
{'Content-Length': len(soundfile)})})
|
||||||
rabbitmq_channel.basic_publish(
|
rabbitmq_channel.basic_publish(
|
||||||
exchange=RABBITMQ_EXCHANGE,
|
exchange=RABBITMQ_EXCHANGE,
|
||||||
routing_key='feature',
|
routing_key='feature',
|
||||||
|
Loading…
Reference in New Issue
Block a user