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 bd73eb2..0918032 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"