Skip to content

Instantly share code, notes, and snippets.

@montasim
Last active June 27, 2024 17:34
Show Gist options
  • Save montasim/ddfb33ed377199e2ad1097da751c9e8e to your computer and use it in GitHub Desktop.
Save montasim/ddfb33ed377199e2ad1097da751c9e8e to your computer and use it in GitHub Desktop.
Defines common file extension types for use in API responses. These file extension types represent various types of files that can be served by the API. Adjust these file extension types as needed to align with the APIs content requirements.
/**
* @fileoverview Defines common file extension types for use in API responses.
* These file extension types represent various types of files that can be served by the API.
* Adjust these file extension types as needed to align with the APIs content requirements.
*
* @author Mohammad Montasim -Al- Mamun Shuvo
* @date 2024-03-03
*/
/**
* File extension type for PDF files.
* @type {string}
*/
const FILE_EXTENSION_TYPE_PDF = 'pdf';
/**
* File extension type for JPEG images.
* @type {string}
*/
const FILE_EXTENSION_TYPE_JPG = 'jpg';
/**
* File extension type for PNG images.
* @type {string}
*/
const FILE_EXTENSION_TYPE_PNG = 'png';
/**
* File extension type for ICO images.
* @type {string}
*/
const FILE_EXTENSION_TYPE_ICO = 'ico';
/**
* File extension type for MP4 videos.
* @type {string}
*/
const FILE_EXTENSION_TYPE_MP4 = 'mp4';
/**
* File extension type for JSON files.
* @type {string}
*/
const FILE_EXTENSION_TYPE_JSON = 'json';
/**
* File extension type for XML files.
* @type {string}
*/
const FILE_EXTENSION_TYPE_XML = 'xml';
/**
* File extension type for JavaScript files.
* @type {string}
*/
const FILE_EXTENSION_TYPE_JS = 'js';
/**
* File extension type for CSS files.
* @type {string}
*/
const FILE_EXTENSION_TYPE_CSS = 'css';
/**
* File extension type for HTML files.
* @type {string}
*/
const FILE_EXTENSION_TYPE_HTML = 'html';
/**
* File extension type for GIF images.
* @type {string}
*/
const FILE_EXTENSION_TYPE_GIF = 'gif';
/**
* File extension type for BMP images.
* @type {string}
*/
const FILE_EXTENSION_TYPE_BMP = 'bmp';
/**
* File extension type for TIFF images.
* @type {string}
*/
const FILE_EXTENSION_TYPE_TIFF = 'tiff';
/**
* File extension type for SVG images.
* @type {string}
*/
const FILE_EXTENSION_TYPE_SVG = 'svg';
/**
* File extension type for MP3 audio files.
* @type {string}
*/
const FILE_EXTENSION_TYPE_MP3 = 'mp3';
/**
* File extension type for WAV audio files.
* @type {string}
*/
const FILE_EXTENSION_TYPE_WAV = 'wav';
/**
* File extension type for ZIP archives.
* @type {string}
*/
const FILE_EXTENSION_TYPE_ZIP = 'zip';
/**
* File extension type for RAR archives.
* @type {string}
*/
const FILE_EXTENSION_TYPE_RAR = 'rar';
/**
* File extension type for Markdown files.
* @type {string}
*/
const FILE_EXTENSION_TYPE_MD = 'md';
// Export the file extension types for use in other parts of the application
export {
FILE_EXTENSION_TYPE_PDF,
FILE_EXTENSION_TYPE_JPG,
FILE_EXTENSION_TYPE_PNG,
FILE_EXTENSION_TYPE_ICO,
FILE_EXTENSION_TYPE_MP4,
FILE_EXTENSION_TYPE_JSON,
FILE_EXTENSION_TYPE_XML,
FILE_EXTENSION_TYPE_JS,
FILE_EXTENSION_TYPE_CSS,
FILE_EXTENSION_TYPE_HTML,
FILE_EXTENSION_TYPE_GIF,
FILE_EXTENSION_TYPE_BMP,
FILE_EXTENSION_TYPE_TIFF,
FILE_EXTENSION_TYPE_SVG,
FILE_EXTENSION_TYPE_MP3,
FILE_EXTENSION_TYPE_WAV,
FILE_EXTENSION_TYPE_ZIP,
FILE_EXTENSION_TYPE_RAR,
FILE_EXTENSION_TYPE_MD,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment