Skip to content

Add optional original-quality image uploads - #315

Draft
silencoo wants to merge 1 commit into
cf-pages:mainfrom
silencoo:agent/original-quality-image-upload
Draft

silencoo wants to merge 1 commit into
cf-pages:mainfrom
silencoo:agent/original-quality-image-upload

Conversation

@silencoo

@silencoo silencoo commented Aug 8, 2026

Copy link
Copy Markdown

What changed

  • Add an opt-in Preserve original image quality checkbox to the current homepage.
  • Send opted-in images through Telegram sendDocument instead of sendPhoto.
  • Keep the existing photo mode as the default for backwards compatibility.
  • Snapshot the selected mode when each file enters the upload queue.
  • Reject original-quality Telegram images above 20 MB, because the Bot API getFile path used to serve uploads only supports files up to 20 MB.
  • Hide the Telegram-specific option when R2 storage is selected, since R2 already stores the original bytes.
  • Document the imageUploadMode=document multipart API field in both READMEs.

Why

Telegram optimizes regular photo messages. Sending an image as a document preserves the uploaded file for users who prefer original quality, while leaving existing deployments and API clients unchanged unless they opt in.

Validation

  • npm test — 102 passing
  • Checked the homepage at desktop and 390 px mobile widths
  • Verified the checkbox is keyboard-accessible and does not trigger the surrounding file picker
  • Frontend audit reports only pre-existing findings in legacy admin/e2e files

Telegram references:

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