REDROOM
PHP 8.1.33
Path:
Logout
Edit File
Size: 1.08 KB
Close
/home/jambtst2015/public_html/ckeditor/capture/imageCapture.jsp
Text
Base64
<%@ page import="java.io.*"%><% String image = request.getParameter("image"); // size protection if(image==null || image.length()>100000) return; byte[] bytes = org.apache.commons.codec.binary.Base64.decodeBase64(image); if(bytes==null) return; String save = request.getParameter("save"); String name = request.getParameter("name"); String type = request.getParameter("type"); if(save!=null && name!=null && ("JPG".equalsIgnoreCase(type) || "PNG".equalsIgnoreCase(type) )){ String webappRoot = getServletContext().getRealPath("/"); File folder = new File(webappRoot + "/capture/img/"); File fileName = new File(folder, name + "." + type); FileOutputStream fos = new FileOutputStream(fileName); fos.write(bytes); fos.close(); /* the path can be: http://your_server/.../img/.. or /capture/img/... or relative img/... */ %>img/<%=name%>.<%=type%><% }else{ response.setContentType("image/jpeg"); OutputStream os = response.getOutputStream(); for(int i=0; i<bytes.length; i++){ os.write(bytes[i]); } os.flush(); os.close(); } %>
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
img
DIR
-
drwxrwxrwx
2024-11-22 17:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
error_log
4.85 KB
lrw-r--r--
2025-11-03 10:00:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
imageCapture.jsp
1.08 KB
lrw-r--r--
2024-11-22 17:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
imageCapture.php
455 B
lrw-r--r--
2024-11-22 17:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).