post request form now conforms
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Torma Kristóf 2020-04-29 22:55:26 +02:00
parent 503ffe7f9a
commit 7abec4e257
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047
1 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python3
import logging
import json
from xeger import Xeger
from flask_restful import Resource
from flask import request
@ -69,11 +70,12 @@ class SampleResource(Resource):
requests.post(
f"http://{STORAGE_HOSTNAME}/object",
files={
'tag': (None, generated_tag),
'file': (
'description': (None, json.dumps({'tag': generated_tag}), 'application/json'),
'soundfile': (
'wave.wav',
soundfile,
soundfile.content_type)})
soundfile.content_type,
{'Content-Length': len(soundfile)})})
rabbitmq_channel.basic_publish(
exchange=RABBITMQ_EXCHANGE,
routing_key='feature',