Merged
Conversation
Collaborator
PaulHax
commented
Nov 24, 2025
- Content-Disposition header support: Extracts filenames from RFC 6266 headers, enabling loading from APIs without file extensions in URL paths
- ZIP magic bytes detection: Detects ZIP files by signature regardless of extension, handling archives with generic Content-Type headers
- URL parameter validation: Validates and normalizes URL parameters with support for comma-separated and bracket notation
- ZIP archive filtering: Excludes LICENSE files from extraction to prevent load failures
- Add urlParams.ts utility for parsing and validating URL parameters
- Validates URLs in the urls and config parameters
- Supports comma-separated and bracket notation for multiple URLs
- Filters out invalid URLs and logs errors
- Add ZIP magic bytes detection to file type identification
- Detects ZIP files by PK header signature (0x50, 0x4b, 0x03, 0x04)
- Enables loading of ZIP archives from URLs without .zip extension
- Fixes loading DICOM files from APIs that return ZIP archives with
generic Content-Type headers (e.g., application/octet-stream)
- Integrate URL parameter normalization in App.vue
- Use normalizeUrlParams() to validate URLs before loading
- Ensures only valid URLs are processed by the loading pipeline
This fixes issues with loading files from URLs that:
1. Return generic Content-Type headers
2. Have no file extension in the URL
3. Don't expose Content-Disposition via CORS headers
…tion Add support for extracting filenames from Content-Disposition headers (RFC 6266) when loading files from URLs. This enables VolView to load files from APIs that don't include file extensions in their URL paths. Priority order for filename detection: 1. Content-Disposition header (new) 2. URL path extension (existing) 3. Magic bytes (existing fallback) Includes comprehensive e2e tests with custom Express test server.
✅ Deploy Preview for volview-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Only use Content-Disposition when name has no extension (indicating URL-derived name like 'download' or 'getImage'). Names with extensions are preserved, avoiding conflicts with explicit user-provided names. - Removed second test case (wrong extension override not supported) - Removed unused server endpoint - Priority: Names with extension > Content-Disposition > Names without extension Fix urls accept relative URLs in config parameter validationfix
- Add error handling for URL parameter parsing in App.vue
- Improve extension detection in openUriStream.ts
- Use basename() and lastIndexOf('.') for robust extension check
- Prevents false positives from hidden files and URL domains
Collaborator
Author
|
@zachmullen This touches a few of the ways VolView sniffs out the format of files. Curious about your thoughts on these techniques/hax if you get a chance. |
zachmullen
approved these changes
Nov 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.