Skip to content

moxie.core.utils.Mime

Davit Barbakadze edited this page Aug 5, 2017 · 2 revisions

Important! This page is auto-generated from the comments in the source files. All changes will be overwritten! If you are looking to contribute, modify the comment in the corresponding source file instead.

Module: moxie.core.utils.Mime

Table of Contents

Properties

Map of mimes to extensions

Map of extensions to mimes

Methods

Parses mimeData string into a mimes and extensions lookup maps. String should have the following format:

application/msword,doc dot,application/pdf,pdf, ...

so mime-type followed by comma and followed by space-separated list of associated extensions, then comma again and then another mime-type, etc.

If invoked externally will replace override internal lookup maps with user-provided data.

Arguments

  • mimeData String

Extract extension from the given filename

Arguments

  • fileName String

Get file mime-type from it's filename - will try to match the extension against internal mime-type lookup map

Arguments

  • fileName String