mirror of
https://github.com/mmahdium/portfolio.git
synced 2026-08-14 12:12:48 +03:30
feat: add current month and year tag to resume filename generation
This commit is contained in:
@@ -160,7 +160,10 @@ export default defineEventHandler(async (event) => {
|
||||
})
|
||||
|
||||
const query = getQuery(event)
|
||||
const filename = (query.filename as string) || 'Ali_Arghyani_Resume.pdf'
|
||||
const now = new Date()
|
||||
const year = now.getFullYear()
|
||||
const monthName = now.toLocaleString('en-US', { month: 'long' })
|
||||
const filename = (query.filename as string) || `Ali_Arghyani_Resume_${monthName.replace(/\s+/g, '')}_${year}.pdf`
|
||||
const download = query.download === 'true'
|
||||
|
||||
setResponseHeaders(event, {
|
||||
|
||||
Reference in New Issue
Block a user