[DeviceStorage] ODT files have no mimetype

RESOLVED INCOMPLETE

Status

()

RESOLVED INCOMPLETE
4 years ago
10 months ago

People

(Reporter: joshua-s, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
=== Procedure ===
Run the following script on a Firefox OS device with an ODT file in the sdcard.

var storage = navigator.getDeviceStorage('sdcard');
var cursor = storage.enumerate();
		
cursor.onsuccess = function() {
  console.log(this.result.name+': '+this.result.type);
  cursor.continue();
}

=== Expected result ===
All files have an associated mime type.

=== Actual result ===
ODT files have a blank mimetype, instead of the proper 'application/vnd.oasis.opendocument.text'. This hinders us from implementing ODT support in Firetext (https://github.com/codexa/firetext).
That's because https://mxr.mozilla.org/mozilla-central/source/uriloader/exthandler/gonk/nsOSHelperAppService.cpp#39 is not implemented.

A workaround for on your side could be to check the file extension until we add a mapping table on the platform side.
Cleaning up Device Interfaces component, and mass-marking old FxOS bugs as incomplete.

If any of these bugs are still valid, please let me know.
Status: NEW → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.