Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

18
LINES

< > BotCompany Repo | #1010478 // extensionToMimeType

JavaX fragment (include)

static SS extensionToMimeType_map = litCIMap(
  "cal", "text/plain",
  "zip", "application/zip",
  "svg", svgContentType(),
  "html", "text/html",
  "txt", "text/plain",
  "css", "text/css",
  "js", "text/javascript",
  "png", "image/png",
  "jpg", "image/jpeg",
  "jpeg", "image/jpeg",
  "wasm", "application/wasm",
  "mp3", "audio/mpeg");

static S extensionToMimeType(S s) {
  s = substring(s, lastIndexOf(s, '.')+1);
  ret extensionToMimeType_map.get(s);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1010478
Snippet name: extensionToMimeType
Eternal ID of this version: #1010478/10
Text MD5: 2e9d76cb5efa28f71e02885523d3d02e
Author: stefan
Category: javax / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-20 16:51:53
Source code size: 477 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 373 / 429
Version history: 9 change(s)
Referenced in: [show references]