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

19
LINES

< > BotCompany Repo | #1025896 // Test file upload bug

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (7587L/42K).

1  
!7
2  
3  
static NanoHTTPD.Response serve(S uri, NanoHTTPD.Method method,
4  
  Map<S,S> header, Map<S,S> params, Map<S,S> files) {
5  
  ret serveHTML(p("Have " + nFiles(l(files)) + ": " + sfu(files) + ", sizes: " + map fileSize(values(files)) + ".")
6  
    + huploadform(
7  
      "File: " + hfileupload(/*"accept", "image/png,image/jpeg,image/gif"*/) + " "
8  
    + "<br>"
9  
    + hsubmit());
10  
}
11  
12  
cmodule TestFileUploadBug > DynPrintLogAndEnabled {
13  
  start-thread {
14  
    if (!enabled) ret;
15  
    printMyIPAddresses();
16  
    serveHttp(print("Port", 6565));
17  
    dm_ownResource(serveHttp_server);
18  
  }
19  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1025896
Snippet name: Test file upload bug
Eternal ID of this version: #1025896/10
Text MD5: 7c3e2b03742129bc28037f0a0b5ba02c
Transpilation MD5: a0f3bb92e372716e14f0ed1c374370fe
Author: stefan
Category: javax / html
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-10 13:04:14
Source code size: 589 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 247 / 458
Version history: 9 change(s)
Referenced in: [show references]