mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Refactor for logos in dockerfile
This commit is contained in:
parent
ba133360a2
commit
802490a7ee
@ -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
|
||||
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user