I am trying to upload file with extension m3u8 through paperclip and have content type application/vnd.apple.mpegurl
. Paperclip save content type as a text/plain
in database.
I have validate as below.
validates_attachment_content_type :media,
:content_type => ['application/vnd.apple.mpegurl', 'text/plain']
But it gives validation error like "file has an extension that does not match its contents"
Could you please help to fix how I can allow m3u8 extension to upload ?
Thanks in advance, Nitin