Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the content_type for WebVtt?

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?

like image 749
Sonny Black Avatar asked Feb 09 '23 00:02

Sonny Black


1 Answers

The MIME type for WebVTT caption files is text/vtt as specified in https://w3c.github.io/webvtt/#iana-text-vtt

like image 139
Peter Avatar answered Feb 15 '23 00:02

Peter