adding mime type to api response

This commit is contained in:
jfriedli 2019-08-12 07:28:08 -07:00 committed by jvoisin
parent 28253053ff
commit 08ce6aed76
3 changed files with 3 additions and 0 deletions

View File

@ -102,6 +102,7 @@ The `file` parameter is the base64 encoded file which will be cleaned.
```json
{
"output_filename": "fancy.cleaned.jpg",
"mime": "image/jpg",
"key": "81a541f9ebc0233d419d25ed39908b16f82be26a783f32d56c381559e84e6161",
"meta": {
"BitDepth": 8,

View File

@ -147,6 +147,7 @@ def create_app(test_config=None):
key, meta_after, output_filename = cleanup(parser, filepath)
return {
'output_filename': output_filename,
'mime': mime,
'key': key,
'meta': meta,
'meta_after': meta_after,

View File

@ -37,6 +37,7 @@ class Mat2APITestCase(unittest.TestCase):
data = json.loads(request.data.decode('utf-8'))
expected = {
'output_filename': 'test_name.cleaned.jpg',
'mime': 'image/jpeg',
'key': '81a541f9ebc0233d419d25ed39908b16f82be26a783f32d56c381559e84e6161',
'meta': {
'BitDepth': 8,