1 | static SS extensionToMimeType_map = litCIMap( |
2 | "cal", "text/plain", |
3 | "zip", "application/zip", |
4 | "svg", svgContentType(), |
5 | "html", "text/html", |
6 | "txt", "text/plain", |
7 | "css", "text/css", |
8 | "js", "text/javascript", |
9 | "png", "image/png", |
10 | "jpg", "image/jpeg", |
11 | "jpeg", "image/jpeg", |
12 | "wasm", "application/wasm", |
13 | "mp3", "audio/mpeg"); |
14 | |
15 | static S extensionToMimeType(S s) { |
16 | s = substring(s, lastIndexOf(s, '.')+1); |
17 | ret extensionToMimeType_map.get(s); |
18 | } |
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: | 541 / 607 |
Version history: | 9 change(s) |
Referenced in: | [show references] |