mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
5925849414
* feat(xiaohongshu): use CDP DOM.setFileInputFiles for image upload Replace base64 DataTransfer injection with CDP DOM.setFileInputFiles, which lets Chrome read image files directly from the local filesystem. This eliminates payload size limits that caused "fetch failed" errors when uploading large images (>500KB) through the browser bridge. Changes: - Add 'set-file-input' action to protocol, extension handler, and CDP executor - Add Page.setFileInput() method for CLI-side usage - Rewrite publish image upload to use CDP path, with base64 fallback for older extension versions that don't support the new action - Add clear warning when falling back to base64 with large payloads Closes #542 (partially — image upload reliability) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test: cover cdp file input upload path * fix: keep image upload on image-only inputs --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: jackwener <jakevingoo@gmail.com>