feat: add current month and year tag to resume filename generation

This commit is contained in:
mahdiarghyani
2025-12-15 13:32:08 +03:30
parent 7c566b5752
commit 45b98f442e
2 changed files with 14 additions and 3 deletions
+4 -1
View File
@@ -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, {