To reproduce:
- Install LibreOffice and make sure that csv files are associated to Calc
(Note: tested with Firefox 46.0.1 on Windows 8)
- Go to Home > Tools > Quote editor > Quote uploader
- Try to upload a valid CSV (e.g. Example from Bug 15684)
Result: File can not be uploaded
(Incorrect filetype: application/vnd.sun.xml.calc)
To test:
- Apply patch
- Try to upload again
Expected result: Quotes are imported.
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Can't reproduce on a Mac but get it fails on a Windows Box: fixed with this
patch.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Can't recreate on debian but the fix looks safe.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
var fileType = evt.target.files[0].type || 'unknown';
var fileSizeInK = Math.round(evt.target.files[0].size/1024);
- if (!fileType.match(/comma-separated-values|csv|excel/i)) {
+ if (!fileType.match(/comma-separated-values|csv|excel|calc/i)) {
alert(_("Uploads limited to csv. Incorrect filetype: %s").format(fileType));
parent.location='quotes-upload.pl';
return;