Skip to content

Commit bc397a4

Browse files
committed
Safe and unique saved attachment filename
1 parent d8380cb commit bc397a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AbraFlexi/RO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2578,7 +2578,7 @@ public function downloadInFormat(
25782578
$lang = null,
25792579
$sign = false
25802580
) {
2581-
$downloadTo = $destDir . $this->getEvidence() . '_' . $this->getMyKey() . '.' . $format;
2581+
$downloadTo = $destDir . $this->getEvidence() . '_' . str_replace(['/',' ',':'],'_',$this->getRecordIdent()) . '.' . $format;
25822582
$downloaded = $this->getInFormat($format, $reportName, $lang, $sign);
25832583
return file_put_contents($downloadTo, $downloaded) ? $downloadTo : null;
25842584
}

0 commit comments

Comments
 (0)