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

15
LINES

< > BotCompany Repo | #1014038 // Serve Images

JavaX source code (desktop) [tags: butter use-pretranspiled] - run with: x30.jar - homepage

Download Jar. Libraryless. Click here for Pure Java version (3868L/27K).

!7

html {
  uri = dropPrefix("/", uri);
  long id = parseLong(uri);
  
  File f = programFile(#1010733, "blob_" + id);
  if (!f.exists())
    saveBinaryPageToFile("http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_" + id, f);

  if (isPNG(f))
    ret subBot_servePNG(f);
  else
    ret subBot_serveJPEG(f);
}

Author comment

Began life as a copy of #1014036

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1014038
Snippet name: Serve Images
Eternal ID of this version: #1014038/4
Text MD5: 61f5d3846ca93d4c5d29833e5639c29f
Transpilation MD5: 1ffefd0e476bd079d1aa00bd2fadcd34
Author: stefan
Category: javax / web
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-09 11:57:11
Source code size: 347 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 492 / 3929
Version history: 3 change(s)
Referenced in: #1013896 - Eleutheria Main for butter.botcompany.de + Stefan's OS (LIVE)
#1024026 - Eleutheria Main for butter.botcompany.de (backup without Stefan's OS)