162 lines
No EOL
2.7 KiB
JavaScript
162 lines
No EOL
2.7 KiB
JavaScript
const extensoes = [
|
|
{
|
|
ext: "gif",
|
|
tipo: "imagem",
|
|
mime: "image/gif"
|
|
},
|
|
{
|
|
ext: "jpg",
|
|
tipo: "imagem",
|
|
mime: "image/jpeg"
|
|
},
|
|
{
|
|
ext: "jpeg",
|
|
tipo: "imagem",
|
|
mime: "image/jpeg"
|
|
},
|
|
{
|
|
ext: "png",
|
|
tipo: "imagem",
|
|
mime: "image/png"
|
|
},
|
|
{
|
|
ext: "bmp",
|
|
tipo: "imagem",
|
|
mime: "image/bmp"
|
|
},
|
|
{
|
|
ext: "webp",
|
|
tipo: "imagem",
|
|
mime: "image/webp"
|
|
},
|
|
{
|
|
ext: "tiff",
|
|
tipo: "imagem",
|
|
mime: "image/tiff"
|
|
},
|
|
{
|
|
ext: "svg",
|
|
tipo: "imagem",
|
|
mime: "image/svg+xml"
|
|
},
|
|
{
|
|
ext: "ico",
|
|
tipo: "imagem",
|
|
mime: "image/x-icon"
|
|
},
|
|
{
|
|
ext: "pdf",
|
|
tipo: "documento",
|
|
mime: "application/pdf"
|
|
},
|
|
{
|
|
ext: "doc",
|
|
tipo: "documento",
|
|
mime: "application/msword"
|
|
},
|
|
{
|
|
ext: "docx",
|
|
tipo: "documento",
|
|
mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
|
},
|
|
{
|
|
ext: "xls",
|
|
tipo: "documento",
|
|
mime: "application/vnd.ms-excel"
|
|
},
|
|
{
|
|
ext: "xlsx",
|
|
tipo: "documento",
|
|
mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
},
|
|
{
|
|
ext: "ppt",
|
|
tipo: "documento",
|
|
mime: "application/vnd.ms-powerpoint"
|
|
},
|
|
{
|
|
ext: "pptx",
|
|
tipo: "documento",
|
|
mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
|
},
|
|
{
|
|
ext: "txt",
|
|
tipo: "documento",
|
|
mime: "text/plain"
|
|
},
|
|
{
|
|
ext: "odt",
|
|
tipo: "documento",
|
|
mime: "application/vnd.oasis.opendocument.text"
|
|
},
|
|
{
|
|
ext: "ods",
|
|
tipo: "documento",
|
|
mime: "application/vnd.oasis.opendocument.spreadsheet"
|
|
},
|
|
{
|
|
ext: "rtf",
|
|
tipo: "documento",
|
|
mime: "application/rtf"
|
|
},
|
|
{
|
|
ext: "csv",
|
|
tipo: "documento",
|
|
mime: "text/csv"
|
|
},
|
|
{
|
|
ext: "mp4",
|
|
tipo: "v\xEDdeo",
|
|
mime: "video/mp4"
|
|
},
|
|
{
|
|
ext: "avi",
|
|
tipo: "v\xEDdeo",
|
|
mime: "video/x-msvideo"
|
|
},
|
|
{
|
|
ext: "mkv",
|
|
tipo: "v\xEDdeo",
|
|
mime: "video/x-matroska"
|
|
},
|
|
{
|
|
ext: "mov",
|
|
tipo: "v\xEDdeo",
|
|
mime: "video/quicktime"
|
|
},
|
|
{
|
|
ext: "wmv",
|
|
tipo: "v\xEDdeo",
|
|
mime: "video/x-ms-wmv"
|
|
},
|
|
{
|
|
ext: "flv",
|
|
tipo: "v\xEDdeo",
|
|
mime: "video/x-flv"
|
|
},
|
|
{
|
|
ext: "webm",
|
|
tipo: "v\xEDdeo",
|
|
mime: "video/webm"
|
|
},
|
|
{
|
|
ext: "3gp",
|
|
tipo: "v\xEDdeo",
|
|
mime: "video/3gpp"
|
|
},
|
|
{
|
|
ext: "mpeg",
|
|
tipo: "v\xEDdeo",
|
|
mime: "video/mpeg"
|
|
}
|
|
];
|
|
const tipoArquivo = (nomeArquivo) => {
|
|
const extArquivo = String(nomeArquivo || "").toLocaleLowerCase().split(".").pop();
|
|
const extensao = extensoes.find((extensao2) => extensao2.ext === extArquivo);
|
|
return extensao?.tipo || "outros";
|
|
};
|
|
export {
|
|
extensoes,
|
|
tipoArquivo
|
|
};
|
|
//# sourceMappingURL=extensoes.js.map
|