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

Documentation
2.1.2

File Type Identification in the Application

When using this forge component with another component that identifies MIME types based on file magic numbers (example: GetMimeTypes by Magic Numbers), please note that some files do not contain a magic number, and hence cannot be identified based on that. You will need to implement a whitelist for those files. Two lists can be found below, please not however, that these lists are not exhaustive.


A. Files That Can Be Identified by Magic Numbers

The following file types are recognized by specific byte patterns (magic numbers) at the beginning of the file, making them identifiable by MIME type detection mechanisms:

  1. Bitmap - .bmp
  2. Portable Network Graphic - .png
  3. JPEG - .jpg, .jpeg
  4. GIF - .gif 
  5. ICO - .ico
  6. TIFF - .tif, .tiff
  7. TrueType Font - .ttf
  8. Executable/DLL - .exe, .dll
  9. OGG - .ogg
  10. Shockwave Flash File - .swf
  11. WAV/AVI - .wav, .avi
  12. WMV/WMA - .wmv, .wma
  13. MP3 - .mp3
  14. MKV - .mkv
  15. Torrent - .torrent
  16. Portable Document Format - .pdf
  17. Microsoft Excel - .xls, .xlsx
  18. Microsoft Word - .doc, .docx
  19. Microsoft PowerPoint - .ppt, .pptx
  20. Outlook Message File - .msg
  21. RAR Archive - .rar
  22. TAR Archive - .tar
  23. Compressed ZIP - .zip
  24. Bzip2 Archive - .bz2
  25. Gzip Archive - .gz
  26. eXtensible Archive Format - .xar
  27. ISO9660 CD/DVD Image - .iso
  28. Apple Disk Image - .dmg
  29. Microsoft Cabinet File - .cab
  30. ARJ Archive - .arj
  31. LZH Archive - .lzh
  32. RedHat Package Manager File - .rpm
  33. Virtual PC HD Image - .vhd
  34. 7-Zip Archive - .7z
  35. MP4 - .mp4

B. Files That Cannot Be Identified by Magic Numbers

The following file types do not contain specific magic numbers and must be identified based on other attributes, such as file extension:

  1. Text Files - .txt
  2. CSV Files - .csv
  3. HTML Files - .html, .htm
  4. XML Files - .xml
  5. JSON Files - .json
  6. Markdown Files - .md, .markdown
  7. YAML Files - .yaml, .yml
  8. Log Files - .log
  9. Configuration Files - .conf, .ini, .cfg
  10. Script Files - .sh, .bat, .ps1, .py, .js