diff --git a/server/app/functions.php b/server/app/functions.php index 2cac4a12745b1c36faeea436a69acb20bc09d967..c08c5f6b672717f16816b8f3f466781ea90b94e2 100644 --- a/server/app/functions.php +++ b/server/app/functions.php @@ -444,7 +444,7 @@ if (!function_exists('download_file')) { if (!file_exists($saveDir)) { mkdir($saveDir, 0775, true); } - $fileSrc = $saveDir . $fileName; + $fileSrc = public_path()."/".$saveDir . $fileName; file_exists($fileSrc) && unlink($fileSrc); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); @@ -459,7 +459,7 @@ if (!function_exists('download_file')) { unlink($fileSrc); return ''; } - return $fileSrc; + return $saveDir . $fileName; } }