1 | static S uploadToImageServer_new_jpg(BufferedImage img, S name) { |
2 | ret uploadToImageServer_new_jpg(toJPEG(img), name); |
3 | } |
4 | |
5 | static S uploadToImageServer_new_jpg(byte[] imgData, S name) { |
6 | S page = postPage(imageServerURL() + "upload", "data", bytesToHex(imgData), "name", name); |
7 | print(page); |
8 | Matcher m = Pattern.compile("/images/([0-9]+)").matcher(page); |
9 | if (!m.find()) fail("Image server said: " + page); |
10 | ret imageServerURL() + m.group(1); |
11 | } |
Began life as a copy of #1005851
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1009027 |
Snippet name: | uploadToImageServer_new_jpg - used internally only |
Eternal ID of this version: | #1009027/9 |
Text MD5: | 37184e2d5694ade9d9dbb2d9bb827f8c |
Author: | stefan |
Category: | javax / images |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-02-29 13:54:13 |
Source code size: | 460 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 480 / 525 |
Version history: | 8 change(s) |
Referenced in: | [show references] |