package com.njzscloud.common.core.utils;

import cn.hutool.core.util.StrUtil;

/**
 * MIME
 */
public class Mime {
    public static final String FORM = "application/x-www-form-urlencoded";
    public static final String MULTIPART_FORM = "multipart/form-data";
    public static final String BINARY = "application/octet-stream";
    public static final String JSON = "application/json";
    public static final String X_NDJSON = "application/x-ndjson";
    public static final String XML = "application/xml";
    public static final String TXT = "text/plain";
    public static final String HTML = "text/html";
    public static final String CSS = "text/css";
    public static final String GIF = "image/gif";
    public static final String JPG = "image/jpeg";
    public static final String PNG = "image/png";
    public static final String SVG = "image/svg+xml";
    public static final String WEBP = "image/webp";
    public static final String PDF = "image/pdf";
    public static final String PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
    public static final String XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
    public static final String DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
    public static final String PPT = "application/vnd.ms-powerpoint";
    public static final String XLS = "application/vnd.ms-excel";
    public static final String DOC = "application/msword";
    public static final String ZIP = "application/zip";
    public static final String MP3 = "audio/mpeg";
    public static final String MP4 = "video/mp4";


    public static String u8Val(String mime) {
        return StrUtil.format("{};charset={}", mime, "UTF-8");
    }

}
