Skip to content

Feat: Download Linear upload images locally#7

Open
mojek wants to merge 1 commit intocasals:masterfrom
mojek:feat/download-linear-images
Open

Feat: Download Linear upload images locally#7
mojek wants to merge 1 commit intocasals:masterfrom
mojek:feat/download-linear-images

Conversation

@mojek
Copy link
Copy Markdown

@mojek mojek commented Mar 14, 2026

Summary

  • Linear upload URLs (uploads.linear.app) require authentication — without it they return HTML (login page), causing Obsidian to skip them with "unsupported Content-Type: text/html"
  • During sync, images are now downloaded using requestUrl from Obsidian API (bypasses CORS) with the Linear API key for auth
  • Images are saved to <syncFolder>/attachments/ with stable filenames (ISSUE-ID-uuid.ext)
  • Linear upload URLs in descriptions are replaced with Obsidian embeds (![[attachments/...]])
  • Already downloaded images are skipped on subsequent syncs

Test plan

  • Issues with Linear-uploaded images sync with images downloaded locally
  • Images render correctly in Obsidian notes
  • Re-syncing doesn't re-download existing images
  • Issues without images sync normally (no regression)

Linear upload URLs (uploads.linear.app) require authentication and
return HTML login page without proper Authorization header, causing
"unsupported Content-Type: text/html" errors in Obsidian.

This change:
- Downloads images from Linear uploads using Obsidian's requestUrl
  (bypasses CORS) with the API key for authentication
- Saves images to <syncFolder>/attachments/ with stable filenames
- Replaces Linear upload URLs in issue descriptions with Obsidian
  embeds (![[attachments/ISSUE-uuid.ext]])
- Skips already downloaded images to avoid redundant fetches

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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