Skip to content

Commit

Permalink
Safe and unique saved attachment filename
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Apr 18, 2024
1 parent d8380cb commit bc397a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AbraFlexi/RO.php
Expand Up @@ -2578,7 +2578,7 @@ public function downloadInFormat(
$lang = null,
$sign = false
) {
$downloadTo = $destDir . $this->getEvidence() . '_' . $this->getMyKey() . '.' . $format;
$downloadTo = $destDir . $this->getEvidence() . '_' . str_replace(['/',' ',':'],'_',$this->getRecordIdent()) . '.' . $format;
$downloaded = $this->getInFormat($format, $reportName, $lang, $sign);
return file_put_contents($downloadTo, $downloaded) ? $downloadTo : null;
}
Expand Down

0 comments on commit bc397a4

Please sign in to comment.