@tinyhttp/content-disposition
Advanced tools
Comparing version 1.0.1 to 1.0.2
# @tinyhttp/content-disposition | ||
## 1.0.2 | ||
### Patch Changes | ||
- strip bytes from readme | ||
## 1.0.1 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@tinyhttp/content-disposition", | ||
"description": "content-disposition rewrite in TypeScript with ESM and CommonJS targets", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"homepage": "https://github.com/talentlessguy/tinyhttp#readme", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -66,5 +66,3 @@ # @tinyhttp/accepts | ||
```js | ||
const disposition = contentDisposition.parse( | ||
'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt' | ||
) | ||
contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt') | ||
``` | ||
@@ -100,7 +98,5 @@ | ||
createServer((req, res) => { | ||
// set headers | ||
res.setHeader('Content-Type', 'application/pdf') | ||
res.setHeader('Content-Disposition', contentDisposition(filePath)) | ||
// send file | ||
const stream = fs.createReadStream(filePath) | ||
@@ -107,0 +103,0 @@ stream.pipe(res) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105