Commit 543b9bc
Add content-type input with smart auto-detection
- Add `content-type` input to override auto-detected content type
- Include `unspecified` as a valid value (matches backend/frontend)
- Rewrite `determineContentType` to verify file contents against
extensions using magic bytes: gzip header (1f 8b), tar header
(ustar at offset 257), and decompressed tar-inside-gzip check
- Warn when extension doesn't match actual file contents
- Fall back to content-based heuristics when no extension matches
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 09ceb41 commit 543b9bc
6 files changed
Lines changed: 194 additions & 59 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
| |||
0 commit comments