Forums

Mime-Type problem

Hi guys,

I have a code that using amazon polly to generate an Audio Stream ogg_vorbis Format. I created a file, with file.write python os. The file is upload in mysite/audio directory.

When I check the content-type for this file I have: 13:16 ~/mysite/audios $ file --mime-type isaac75EN64.ogg isaac75EN64.ogg: audio/ogg

Everything is fine, I can play the audio and have desire result. (If I send by email, will work perfectly)

After that I send via Twilio for reaching my Whatsup, and have an error there, I open a ticket and this is what the analyst says:

curl --silent --dump-header - --output /dev/null 'https://www.pythonanywhere.com/user/imango/files/home/imango/mysite/audios/isaac75EN64.ogg'| grep -i Content-Type $ Content-Type: text/html; charset=utf-8

The CURL command returned text/html as content type, which might have been incorrectly set for that media file and is not supported by Twilio.

It`s possible that the webserver for pythonanywhere are giving a wrong content type?

Tks for your help. Cheers, Isaac.

We will investigate it next week.