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

19
LINES

< > BotCompany Repo | #1007313 // Upload Image [hotwirable module]

JavaX module [tags: use-pretranspiled]

Download Jar. Libraryless. Click here for Pure Java version (6724L/50K/190K).

!7

static void go(final BufferedImage img, S title) {
  final JTextField tf = jTextField(title);
  showFormTitled("Upload Image",
    "Image title (optional)", tf, func {
      disableSubmitButton(getFrame(tf));
      thread "Upload Image" {
        try {
          messageBox("Image uploaded as " + uploadImage(getTextTrim(tf), toPNG(img));
          disposeFrame(tf);
        } catch e {
          enableSubmitButton(getFrame(tf));
          messageBox(e);
        }
      }
      false;
    });
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1007313
Snippet name: Upload Image [hotwirable module]
Eternal ID of this version: #1007313/11
Text MD5: 48014f46ad6a4df10901071b32a87593
Transpilation MD5: 7ae1d560139e6ae978935371c88ece6d
Author: stefan
Category: javax / gui
Type: JavaX module
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-15 03:04:11
Source code size: 518 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 554 / 1471
Version history: 10 change(s)
Referenced in: #1004553 - ImageSurface
#1016427 - Upload Image To Image Server [hotwirable module]