We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77f9858 commit da035faCopy full SHA for da035fa
1 file changed
apps/sim/app/api/tools/ramp/upload-receipt/route.ts
@@ -39,9 +39,10 @@ function buildReceiptMultipartBody(
39
}
40
41
const safeFileName = file.name.replace(/[\r\n"]/g, '_')
42
+ const safeContentType = file.type.replace(/[\r\n]/g, '') || 'application/octet-stream'
43
parts.push(
44
Buffer.from(
- `--${boundary}\r\nContent-Disposition: attachment; name="receipt"; filename="${safeFileName}"\r\nContent-Type: ${file.type}\r\n\r\n`
45
+ `--${boundary}\r\nContent-Disposition: attachment; name="receipt"; filename="${safeFileName}"\r\nContent-Type: ${safeContentType}\r\n\r\n`
46
)
47
48
parts.push(file.buffer)
0 commit comments