mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #00080
[Bug 514069] Re: Mahara needs to check MIME Type "application/x-zip-compressed" when importing LEAP2a zip file.
Hi Shen,
get_mimetypes_from_description('zip') is currently returning the
following list:
application/zip
application/x-zip
application/zip-compressed
application/x-zip-compressed
This does the job for me in all my test environments but I think your
browser might be uploading the file with a mimetype that's not on that
list. Google tells me they can also be 'multipart/x-zip', so I can add
that one to the list.
But it'd be a great help if we could find out for sure what your browser says it is. You could do this by temporarily replacing line 234 further down that in that file, changing it from
$form->set_error('leap2afile',
get_string('fileisnotaziporxmlfile', 'admin'));
to
$form->set_error('leap2afile', 'Mime type: ' .
$values['leap2afile']['type']);
and then try uploading the file again.
--
Mahara needs to check MIME Type "application/x-zip-compressed" when importing LEAP2a zip file.
https://bugs.launchpad.net/bugs/514069
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Status in Mahara ePortfolio: Fix Released
Bug description:
If the MIME type of LEAP2a zip file is "application/x-zip-compressed", we can't import the file.
We need to fix admin/users/add.php to check MIME Type "application/x-zip-compressed" when importing LEAP2a zip file as below.
File: admin/users/add.php
Line: 202
[before]
if ($values['leap2afile']['type'] == 'application/zip') {
[after]
if ($values['leap2afile']['type'] == 'application/zip'||$values['leap2afile']['type'] == 'application/x-zip-compressed') {