Bug on file upload: Minio has no content type
I tried to deploy the up to date orchestration on our staging vm. Most things seems to work, but I wanted to test the shared env variable for the allowed mime types.
While it works to share it between the frontend (for validation) and the backend (at least it is the env - so it should set the allowed mime types in the config) I run into a problem when I tried to upload a file:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2070, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1515, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1513, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1499, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/usr/src/app/project/api/token_checker.py", line 36, in wrapper
return fn(*args, **kwargs)
File "/usr/src/app/project/api/upload_files.py", line 23, in upload
response = minio.upload_object(file)
File "/usr/src/app/project/api/flask_minio.py", line 147, in upload_object
content_type = self.content_type(filename=uploaded_file.filename)
AttributeError: 'FlaskMinio' object has no attribute 'content_type'
The code refers to a content type method that is simply not there.