20
edits
| Line 30: | Line 30: | ||
There is a mime and file extension mapping list in Gaia(http://mxr.mozilla.org/gaia/source/shared/js/mime_mapper.js). Currently this is used for those media files not in storage, like mail attachment. It can be used to get file extension by passing MIME type. | There is a mime and file extension mapping list in Gaia(http://mxr.mozilla.org/gaia/source/shared/js/mime_mapper.js). Currently this is used for those media files not in storage, like mail attachment. It can be used to get file extension by passing MIME type. | ||
</OL> <br> | </OL> <br> | ||
Basically B2G does "File Type Check" first for newly-added files, and then get the MIME type via a hardcoded list from nsExternalHelperAppService.cpp to pass it to a decoder created in DecoderTraits.cpp. | Basically B2G does "File Type Check" first for newly-added files, and then get the MIME type via a hardcoded file extension- mime type mapped list from nsExternalHelperAppService.cpp to pass it to a decoder created in DecoderTraits.cpp. | ||
edits