static S uploadToImageServer_new_jpg(BufferedImage img, S name) { ret uploadToImageServer_new_jpg(toJPEG(img), name); } static S uploadToImageServer_new_jpg(byte[] imgData, S name) { S page = postPage(imageServerURL() + "upload", "data", bytesToHex(imgData), "name", name); print(page); Matcher m = Pattern.compile("/images/([0-9]+)").matcher(page); if (!m.find()) fail("Image server said: " + page); ret imageServerURL() + m.group(1); }
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: | 713 / 751 |
| Version history: | 8 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1010476 - uploadFileToDiagramServer |