Omeka thinks .srt is assembler file

I’m trying to upload an .srt file to Omeka and get the following error.

File Upload: The file ‘/tmp/phpsDgARX’ could not be ingested because it has a disallowed MIME type (text/x-asm).

This is on Omeka 2.8 using the Zend S3 storage adapter. From my testing, it seems like this is the result of something within the contents of the caption file itself. For example, I can get it to load if I delete all occurrances of the letter ‘s.’ My hunch is that there is some string in the file that Omeka is interpreting as a mime declaration, but I see nothing obvious.

I was able to get the file to load by allowing the upload of text/x-asm but I would love it if I didn’t need to do that.

image

I generated caption files for ~300 videos and it seems about 30 had problems. I’m going to check and see if the others were the same issue.

I just looked at a few more and Omeka also interpreted some of these as a c source file (text/x-c).

Detection for plain text files like SRT is tricky because they don’t contain “magic” sequences that binary files generally do, so the MIME detection system generally has to use heuristics or otherwise just guess at what the file is. The MIME detection stuff is provided by your server, often the “file” package, so it’s possible that updating that could resolve some issues.

WebVTT has a slightly more structured format that should be easier to detect, so converting to that might be an option also.

I checked, and it is the file command returning the wrong mime type.

I had been intending to switch to VTT eventually anyway so I gave that shot and had the same issue. I’ll talk to my host and see if there’s anything that can be done on that end.

As always, thank you for your help on this!

This topic was automatically closed after 250 days. New replies are no longer allowed.