code: @Override
      protected void buildJsonItemSpecificPart(JSONObject jsonObj, CmsResource res, String sitePath) {
  
          try {
              // file mimetype
              String mt = OpenCms.getResourceManager().getMimeType(getJsp().link(sitePath), null);
              if (mt.equals("application/msword")
                  || mt.equals("application/vnd.openxmlformats-officedocument.wordprocessingml.document")) {
                  mt = "application/msword";
              } else if (mt.equals("application/pdf")) {
                  mt = "application/pdf";
              } else if (mt.equals("application/vnd.ms-excel")
                  || mt.equals("application/excel")
                  || mt.equals("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")) {
                  mt = "application/excel";
              } else if (mt.equals("application/vnd.ms-powerpoint")
                  || mt.equals("application/vnd.openxmlformats-officedocument.presentationml.presentation")) {
                  mt = "application/powerpoint";
              } else if (mt.equals("image/jpeg")
                  || mt.equals("image/gif")
                  || mt.equals("image/png")
                  || mt.equals("image/tiff")) {
                  mt = "image/image";
              } else if (mt.equals("text/plain")) {
                  mt = "text/plain";
              } else if (mt.equals("text/html")) {
                  mt = "text/html";
              } else
                  if (mt.equals("application/zip") || mt.equals("application/x-gzip") || mt.equals("application/x-tar")) {
                  mt = "application/archiv";
              } else {
                  mt = "unknown/mimetype";
              }
              jsonObj.put("mimetype", mt);
  
          } catch (JSONException e) {
              if (LOG.isErrorEnabled()) {
                  LOG.error(e.getLocalizedMessage(), e);
              }
          }
      }
docs: Fills the JSON object with the specific information used for download file resource type.<p>
  
  <ul>
  <li><code>mimetype</code>: file mimetype.</li>
  </ul>
  
  @see org.opencms.workplace.galleries.A_CmsAjaxGallery#buildJsonItemSpecificPart(JSONObject jsonObj, CmsResource res, String sitePath)