mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 13:38:45 +00:00
remove unused console logs
This commit is contained in:
@@ -12,15 +12,12 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
|
||||
// Check if requested file is PDF based on content-type
|
||||
if (headers['content-type'] === 'application/pdf' && inline) {
|
||||
console.log(headers['content-disposition'])
|
||||
|
||||
// Get filename from content-disposition header
|
||||
const filename = headers['content-disposition'].split('filename*=')[1]
|
||||
// Remove original content-disposition header
|
||||
delete headers['content-disposition']
|
||||
// Add new inline content-disposition header along with filename
|
||||
headers['content-disposition'] = `inline; filename*=UTF-8''${filename}`
|
||||
console.log(headers['content-disposition'])
|
||||
}
|
||||
|
||||
// Send data stream as response
|
||||
|
||||
Reference in New Issue
Block a user