Ship an opt-in server validator that sniffs the first N bytes via file-type and throws if the declared MIME doesn't match. Today the docs explain how to write one by hand — making it a one-line opt-in lowers the bar for security-conscious users.
defineUploadServerConfig({
validators: [verifyContentType()],
})
Ship an opt-in server validator that sniffs the first N bytes via
file-typeand throws if the declared MIME doesn't match. Today the docs explain how to write one by hand — making it a one-line opt-in lowers the bar for security-conscious users.