Refactor for logos in dockerfile

This commit is contained in:
= 2022-07-25 09:01:15 +10:00
parent ba133360a2
commit 802490a7ee
2 changed files with 19 additions and 4 deletions

View File

@ -44,9 +44,6 @@ class UploadAvatar implements ShouldQueue
$path = Storage::putFile($this->directory, new File(sys_get_temp_dir().'/'.$tmp_file));
// info($path);
// info($tmp_file);
$url = Storage::url($path);
//return file path

View File

@ -46,6 +46,24 @@ class CompanyPresenter extends EntityPresenter
}
public function logoDocker($settings = null)
{
if (! $settings) {
$settings = $this->entity->settings;
}
$basename = basename($this->settings->company_logo);
$logo = Storage::get("{$this->company_key}/{$basename}");
if(!$logo)
return $this->logo($settings);
return "data:image/png;base64, ". base64_encode($logo);
}
/**
* Test for using base64 encoding
*/
@ -56,7 +74,7 @@ class CompanyPresenter extends EntityPresenter
}
if(config('ninja.is_docker') || config('ninja.local_download'))
return $this->logo($settings);
return $this->logoDocker($settings);
$context_options =array(
"ssl"=>array(