Skip to content

fix(utils): derive pull extensions from CDN URLs - #26

Merged
himewel merged 3 commits into
mainfrom
fix/pull-extension-from-url
Jul 26, 2026
Merged

fix(utils): derive pull extensions from CDN URLs#26
himewel merged 3 commits into
mainfrom
fix/pull-extension-from-url

Conversation

@himewel

@himewel himewel commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Derive downloaded file extensions from the CDN URL (response-content-disposition filename, then path suffix) instead of the library media name alone.
  • Fixes MultiClipEdit (and similar) items whose library name is *.json but whose baked export is *.mp4.
  • Documents the new extension_from_url helper in the API utils docs.

Test plan

  • gopro-api info <multi-clip-edit-id> --tsv still lists the baked files row with a .mp4 URL
  • gopro-api pull <multi-clip-edit-id> /tmp/gopro-test saves …000.mp4 (not …000.json)
  • Pull a normal .mp4 video and confirm the local name/extension is unchanged
  • Pull a photo/burst and confirm extensions still match the asset (e.g. .jpg)

Made with Cursor

Library filenames can disagree with the real asset (e.g. MultiClipEdit
rows named *.json whose baked source is *.mp4). Prefer content-disposition
or the URL path suffix when naming downloaded files.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the fix label Jul 26, 2026
Co-authored-by: Welbert Castro <welberthime@gmail.com>
@github-actions github-actions Bot added fix and removed fix labels Jul 26, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added fix and removed fix labels Jul 26, 2026
@himewel
himewel merged commit 9b06126 into main Jul 26, 2026
5 checks passed
@himewel
himewel deleted the fix/pull-extension-from-url branch July 26, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants