mime-type-library
Service icon

MIME Type Library

Stable version 2.1.2 (Compatible with OutSystems 11)
Uploaded
 on 29 October 2024
 by 
Borislav Shumarov, Renato Torres
5.0
 (1 rating)
mime-type-library

MIME Type Library

Details
A MIME Type Utils Library, with a MIMEType Static Entity, that could be exposed and used from another modules. Can retrieve the corresponding MIMEType from a Binary Data file, based on the magic numbers. Uses GetMimeTypes by Magic Numbers by Rui Félix under the hood for functionalities.
Read more

Contains a public MIMEType Static Entity, which could be referenced from another modules:


The library has the functionality to retrieve 1 or more corresponding entries from the MIMEType Static Entity by providing a Binary Data file:

 

- MIMEType_GetAllSuitable - Returns a list of suitable MIMETypes on the basis of the magic numbers of a Binary file
- MIMEType_GetByFile to MIMEType_Get - Returns a suitable MIMEType on the basis of the magic numbers of a Binary file

with optional parameters ExtensionPrioritized - Extension of file e.g. ".pdf", ".docx", etc. If non-empty and if more than 1 matching MIME Type found, a check will be made against this parameter and if such an entry exist, it will be the one returned / returned as first in the list

 


Release notes (2.1.2)

Added the following MIME Types to the MIMEType static entity:

  1. bat
  2. cfg
  3. conf
  4. ini
  5. log
  6. markdown
  7. md
  8. ps1
  9. py
  10. yml
  11. yaml
License (2.1.2)
Reviews (1)
by 
2022-06-04
in version 1.1.0
Handy little component!
One minor thing I noticed, all of the values in the "extension" field include the preceding "." except for txt.  (version 1.1.0)
Team
Other assets in this category