I
I
Idobrodushniy2018-04-02 15:57:22
Python
Idobrodushniy, 2018-04-02 15:57:22

Why doesn't debian recognize the audio/ogg mime type?

Hello! I ran into a problem with mime types inside my docker container. I use the python3:latest image in the container, which uses buildpack-deps:jessie internally. I need to check at the entrance to the api mine type of the file. But for some reason, the filesystem in the container recognizes the mimetype of the file as application/octet-stream, while my host machine recognizes the file with its original mimetype - audio/ogg. This happens with files like audio/ogg. I tried to find an answer to this question, but in vain. I tried a lot of things - updated the mime type library, tried to add my own mime type for audio / ogg - nothing helped.
The debian documentation says that it sets the application/octet-stream mime type by default, but I can't skip such a file in the database and store it on the server... And the audio/ogg mime type is important. What are the possible solutions to this problem? #needyourhelp

Answer the question

In order to leave comments, you need to log in

3 answer(s)
#
#, 2018-04-02
@mindtester

если все так важно.. и время идет - попробуйте все тоже самое на ubuntu*... думаю не зависимо от результата, у вас появится букет новых вариантов для понимания
ps и да - как уже дважды сказано - и fs, и db - до фонаря ваши mime types
pps * - если это применимо к контейнерным образам - не забудьте экстразы подтянуть в юбунте, те что с проприетарными кодаками (гугл в помощь, инфы море)

A
awesomer, 2018-04-02
@awesomer

Файловая система никакого отношения к MIME не имеет.
Тип определяется тем, какую сопроводительную информацию отдает вместе с файлом http-сервер.

A
Anton Mashletov, 2018-04-02
@mashletov

Определение mime-типа никак не зависит от файловой системы. Браузер, например, определяет mime тип лишь по расширению файла. Ещё стоит посмотреть настройки веб-сервера.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question