diff --git a/ieducar/intranet/file_check.php b/ieducar/intranet/file_check.php index 1344b39393..5ad4119867 100644 --- a/ieducar/intranet/file_check.php +++ b/ieducar/intranet/file_check.php @@ -60,9 +60,11 @@ function __construct($file, $maxSize = NULL, function sendFile(){ $tmp = $this->file["tmp_name"]; + $tenant = config('legacy.app.database.dbname'); + $file = new File($tmp); if (Storage::put('/', $file)) { - $filePath= Storage::url($file->hashName()); + $filePath= Storage::url($file->hashName($tenant)); return $filePath; } else { $this->errorMessage = "Ocorreu um erro no servidor ao enviar foto. Tente novamente."; @@ -123,4 +125,4 @@ function getExtension($name) } } -?> \ No newline at end of file +?> diff --git a/ieducar/intranet/file_check_just_pdf.php b/ieducar/intranet/file_check_just_pdf.php index 193e7d2f24..75b7e2ad84 100644 --- a/ieducar/intranet/file_check_just_pdf.php +++ b/ieducar/intranet/file_check_just_pdf.php @@ -58,9 +58,12 @@ function __construct($file, $maxSize = NULL, function sendFile(){ $tmp = $this->file["tmp_name"]; + $tenant = config('legacy.app.database.dbname'); + $file = new File($tmp); + if (Storage::put('/', $file)) { - $filePath= Storage::url($file->hashName()); + $filePath= Storage::url($file->hashName($tenant)); return $filePath; } else { $this->errorMessage = "Ocorreu um erro no servidor ao enviar foto. Tente novamente."; @@ -121,4 +124,4 @@ function getExtension($name) } } -?> \ No newline at end of file +?> diff --git a/ieducar/intranet/image_check.php b/ieducar/intranet/image_check.php index ba51b6336c..34be6c27ae 100644 --- a/ieducar/intranet/image_check.php +++ b/ieducar/intranet/image_check.php @@ -83,9 +83,12 @@ function sendPicture(){ $file = new File($tmp); - $this->imageName = $file->hashName(); + $tenant = config('legacy.app.database.dbname'); + + $this->imageName = $file->hashName($tenant); + if (Storage::put('/', $file)) { - $filePath= Storage::url($file->hashName()); + $filePath= Storage::url($file->hashName($tenant)); return $filePath; } else { $this->errorMessage = "Ocorreu um erro no servidor ao enviar foto. Tente novamente."; @@ -157,4 +160,4 @@ function getExtension($name) } } -?> \ No newline at end of file +?>