Fixes for attachments
This commit is contained in:
parent
e11592e172
commit
1eb396f300
1 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue