Skip to content

feat: richText resource extraction and download_file_to_file (superseded by #4) - #3

Closed
typefield wants to merge 1 commit into
DingTalk-Real-AI:mainfrom
typefield:feat/port-lark-features
Closed

typefield wants to merge 1 commit into
DingTalk-Real-AI:mainfrom
typefield:feat/port-lark-features

Conversation

@typefield

@typefield typefield commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #4 — same change resubmitted from a cleanly named branch.

…m lark channel-sdk

- normalize: richText picture/file segments now extract into
  IncomingMessage.resources (analog of lark's post attachment zone).
  Defensive narrowing via isinstance checks; unknown/dirty segments are
  skipped without affecting the rest; download codes deduped per message.
- DingTalkChannel.download_file_to_file: streaming download to a local
  path (64 KiB chunks, no whole-file buffering), SSRF-guarded like
  download_file, same-dir temp file + atomic os.replace, parent dir must
  exist, no partial file left behind. Returns bytes written.
- Tests: resource extraction/dedup/dirty-data; streaming download success,
  missing-parent-dir, and SSRF-block regressions.
@typefield

Copy link
Copy Markdown
Contributor Author

Superseded by #4.

@typefield typefield closed this Sep 16, 2026
@typefield typefield changed the title feat: port richText resource extraction and download_file_to_file from lark channel-sdk feat: richText resource extraction and download_file_to_file (superseded by #4) Sep 16, 2026
@typefield
typefield deleted the feat/port-lark-features branch September 16, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant