]> git.plutz.net Git - lobster/commitdiff
set file name when offering card file
authorPaul Hänsch <paul@plutz.net>
Fri, 5 Feb 2021 01:42:06 +0000 (02:42 +0100)
committerPaul Hänsch <paul@plutz.net>
Fri, 5 Feb 2021 01:42:06 +0000 (02:42 +0100)
cards/export_card.sh

index bd73eb2978bb030995bd9e7fd07c4f3b75b9deda..0918032c6019fc8da3d3be9a0711b539fdb01365 100755 (executable)
@@ -20,5 +20,9 @@
 card="$(GET card |PATH)"
 cardfile="$_DATA/vcard/${card##*/}"
 
+. $_EXEC/pdiread.sh
 . $_EXEC/cgilite/file.sh
+
+printf 'Content-Disposition: inline; filename="%s.vcf"\r\n' "$(pdi_value "$(pdi_load "$cardfile")" FN)"
+
 FILE "$cardfile" "text/vcard; charset=utf-8"