Hello.
I have an API that returns file content as base64 encoded bites. I need to let user download or preview the file (best would be both). My idea was to put base64 bites to binary field and in the view use binary widget. However the binary field does not understand the mime type of the file, thus making the mime type to octet-stream and then not representing it correctly.
Is there a way to provide mime type to binary field (API returns the mime type of the file), so it would understand what kind of file it is?
What other way I can show/download the file from the API in odoo temporary?
P.S. I cannot save the file in odoo system because of security reasons and not to duplicate files.
Thank you for your answers in advance.