mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-02-23 08:39:57 -05:00
adding mime type to api response
This commit is contained in:
parent
28253053ff
commit
08ce6aed76
@ -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,
|
||||
|
1
main.py
1
main.py
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user