One of our OJS journals has published three galley files in .wmv format. The problem is that, when the link to the .wmv file is clicked, it opens as a .asx file. It does this even when I try to download the file, then open it.
We double-checked the original.wmv files to make sure that they were functional and they all open and play outside of OJS using VLC. The issue occurs as soon as they are submitted to the OJS workflow.
Hi, @rcgillis . Thank you for your response. We converted the files to .mp4 format as a workaround for the journal, but I have just created a faux article in my Journal of Marianne with the same files that you can look at: https://journals.ku.edu/marianne/article/view/16215
Bizarre … when I check the mime type of the file using this command, the output certainly shows it as an .asf file:
file --mime-type -b 14551.asf
video/x-ms-asf
It seems unlikely that it would automatically convert the file format on the fly, but I will check with some of my team members to see if they might have some ideas.
Can you check what the mimetype is identified as in the database? You’ll need to link the submission file id to the file id. I think the following SQL might work (replace XXXX with the submission file id):
select f.mimetype from files as f join submission_files as sf on (sf.file_id = f.file_id) where sf.submission_file_id = XXXX;
Looks like the mimetype detection is identifying it as an asf file. That’s either in the filesystem library that we use or in the system’s mimetype definitions. If you can share a copy of the original file with me via a private message, I will check it locally which should help us determine whether the problem is that the library or server level.
It looks like this only effects Firefox. In Chrome I was able to download the file without any issues. It’s a strange one, since it seems to be related to how Firefox prefers mimetype headers over the specified filename. I’m not exactly sure how we can fix it but I’ve asked the team.
@NateWr This is interesting. Before we reported the issue, we tested it on my Windows laptop with Firefox 94.0.1 (64-bit), Chrome 96.0.4664.45 (Official Build) (64-bit) and Microsoft Edge Version 96.0.1054.29 (Official build) (64-bit) and the files download as .asx every time. (Other people who tested for me had the same experience.)
I only tested on Firefox 94.0 and Chromium 96.0.4664.45 on Linux (Ubuntu). I guess it’s possible that Chrome is different than Chromium in this regard, but I’d be surprised. I didn’t test Edge.
If you follow some of the discussion in the issue I filed (linked above), you’ll see some chatter on the Firefox bug tracker about similar issues. So I do think this is down to how the browser interprets the content headers. The question for us is whether we look to the browsers for a solution or consider a workaround for this specific case.