I'd like to allow my application to permit .vtt files on upload. Right now it was only accepting .txt files, but I'd like to add .vtt capability for captions.
I've tried this *with no luck:
validates_attachment_content_type :caption,
:content_type => ['application/txt', 'text/plain', 'WEBVTT', 'application/vtt', 'vtt']
What is the proper format in this case?
The MIME type for WebVTT caption files is text/vtt
as specified in https://w3c.github.io/webvtt/#iana-text-vtt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With