mirror of
https://github.com/saltbo/zpan.git
synced 2026-09-21 13:20:33 +08:00
uPic sends images as base64-encoded JSON: {"file": "iVBORw0K..."}
with Content-Type: application/json, NOT multipart/form-data.
Refactor POST /images to accept both formats:
- multipart/form-data: PicGo, ShareX (file in form field)
- application/json: uPic (base64 string in file field)
Also add magic-byte MIME detection (PNG/JPEG/GIF/WEBP headers)
for when tools don't provide MIME type.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>