Skip to content

fix(media): infer generic upload types safely#43

Merged
ralyodio merged 1 commit into
moshcoder:masterfrom
aiirvizionz:clientkit/media-upload-infer-safe-type
Jul 20, 2026
Merged

fix(media): infer generic upload types safely#43
ralyodio merged 1 commit into
moshcoder:masterfrom
aiirvizionz:clientkit/media-upload-infer-safe-type

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • avoids defaulting empty media upload MIME types to video/mp4
  • accepts explicit allowed video MIME types, or infers from .mp4, .webm, and .mov filenames when the client sends an empty/generic type
  • rejects generic uploads like payload.txt instead of storing them as videos

Tests

  • node --test tests\media-upload-type.test.mjs
  • node --test tests\http-range.test.mjs
  • node_modules\.bin\tsc.CMD -p tsconfig.json --noEmit
  • git diff --check

@ralyodio
ralyodio merged commit cb99fe0 into moshcoder:master Jul 20, 2026
2 checks passed
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.

2 participants