We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41b3b64 commit 75ec5d7Copy full SHA for 75ec5d7
www/core/lib/fs.js
@@ -939,6 +939,11 @@ angular.module('mm.core')
939
* @return {String} Extension.
940
*/
941
self.getExtension = function(mimetype, url) {
942
+ if (mimetype == 'application/x-forcedownload' || mimetype == 'application/forcedownload') {
943
+ // Couldn't get the right mimetype (old Moodle), try to guess it.
944
+ return $mmText.guessExtensionFromUrl(url);
945
+ }
946
+
947
var extensions = mimeToExt[mimetype];
948
if (extensions && extensions.length) {
949
if (extensions.length > 1 && url) {
0 commit comments