Skip to content

Allow REST file API for single attachment with caption#2394

Open
mysubcult wants to merge 1 commit into
LiveHelperChat:masterfrom
mysubcult:rest-api-file-caption
Open

Allow REST file API for single attachment with caption#2394
mysubcult wants to merge 1 commit into
LiveHelperChat:masterfrom
mysubcult:rest-api-file-caption

Conversation

@mysubcult

@mysubcult mysubcult commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Allow REST file API to handle a single attachment with text/caption instead of sending rendered attachment HTML through the normal text body.\n\nThis keeps file uploads working when the message contains a caption and preserves the existing behavior for plain text and multi-file messages.\n\nRelated Telegram extension PR: LiveHelperChat/telegram#73

@remdex

remdex commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Can't accept. You are hardcoding extension which is not the way to go. Implement as separate field in back office where you can define 1+n extensions to be skipped.

@mysubcult

Copy link
Copy Markdown
Contributor Author

Updated per feedback. The hardcoded extension list was removed from the REST API action code.\n\nREST API methods now have a back office field, suburl_file_skip_ext, where extensions can be configured as a comma-separated list. The single-file-with-message path reads that field before using �ody_raw_file with {{msg_clean}}.\n\nThe Telegram PR now sets this field to gs, so stickers keep the old skip behavior while other single attachments can be sent through the file API with caption.

@mysubcult mysubcult force-pushed the rest-api-file-caption branch from 474f8ee to 9dfeb52 Compare June 24, 2026 12:48
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.

2 participants