1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Merge pull request #4875 from turbo124/v5-develop

Fixes for attachments
This commit is contained in:
David Bomba 2021-02-11 19:04:59 +11:00 committed by GitHub
commit 51fdd4a985
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,11 @@ class TempFile
public static function filePath($data, $filename) :string
{
$file_path = sys_get_temp_dir().'/'.sha1(microtime() . '/' . $filename);
$dir_hash = sys_get_temp_dir().'/'.sha1(microtime());
mkdir($dir_hash);
$file_path = $dir_hash . '/' . $filename;
file_put_contents($file_path, $data);