Skip to content

CLI --cover does not upload images, only passes URL to platform #173

@xxzzzzy

Description

@xxzzzzy

Problem

When using wechatsync sync article.md -p toutiao,baijiahao,dayu --cover "URL", the cover URL is passed to platforms but cover image does not display in drafts.

When manually syncing via Chrome extension UI, extension downloads images and re-uploads to platforms - this works and covers display correctly.

Expected behavior

CLI --cover should support downloading images and re-uploading to platforms, not just passing URL string for platforms to fetch (which may fail due to anti-hotlink protection).

Environment

  • CLI version: v2.x
  • OS: Windows (WSL)
  • Chrome extension: latest

Root cause

Chrome extension works because it downloads images first then uploads. CLI code shows that HTTP URL is passed directly without downloading - platform fetches itself and may be blocked by anti-hotlink protection.

Additional context

When using Chrome extension UI (not CLI), images display correctly in platform drafts because extension downloads and re-uploads. CLI only passes URL string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions