mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Force public access to PDFs
This commit is contained in:
parent
b6f382bae2
commit
538ea20437
@ -13,6 +13,7 @@
|
||||
namespace App\Jobs\Entity;
|
||||
|
||||
use App\Exceptions\FilePermissionsFailure;
|
||||
use App\Libraries\MultiDB;
|
||||
use App\Models\Account;
|
||||
use App\Models\Credit;
|
||||
use App\Models\CreditInvitation;
|
||||
@ -101,8 +102,7 @@ class CreateEntityPdf implements ShouldQueue
|
||||
|
||||
public function handle()
|
||||
{
|
||||
$start = microtime(true);
|
||||
// nlog("Start ". $start);
|
||||
MultiDB::setDb($this->company->db);
|
||||
|
||||
/* Forget the singleton*/
|
||||
App::forgetInstance('translator');
|
||||
@ -204,9 +204,9 @@ class CreateEntityPdf implements ShouldQueue
|
||||
try{
|
||||
|
||||
if(!Storage::disk($this->disk)->exists($path))
|
||||
|
||||
Storage::disk($this->disk)->makeDirectory($path, 0775);
|
||||
|
||||
Storage::disk($this->disk)->put($file_path, $pdf);
|
||||
Storage::disk($this->disk)->put($file_path, $pdf, 'public');
|
||||
|
||||
}
|
||||
catch(\Exception $e)
|
||||
|
@ -108,11 +108,9 @@ class GenerateDeliveryNote
|
||||
}
|
||||
|
||||
if(!Storage::disk($this->disk)->exists($this->invoice->client->invoice_filepath($invitation)))
|
||||
|
||||
Storage::disk($this->disk)->makeDirectory($this->invoice->client->invoice_filepath($invitation), 0775);
|
||||
|
||||
Storage::disk($this->disk)->put($file_path, $pdf);
|
||||
|
||||
//return Storage::disk($this->disk)->path($file_path);
|
||||
Storage::disk($this->disk)->put($file_path, $pdf, 'public');
|
||||
|
||||
return $file_path;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user