mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for paths to s3 type storage
This commit is contained in:
parent
6da6388371
commit
161f20fae7
@ -795,8 +795,6 @@ class InvoiceController extends BaseController
|
||||
|
||||
$file_path = $invoice->service()->getInvoicePdf($contact);
|
||||
|
||||
nlog($file_path);
|
||||
|
||||
return response()->download($file_path, basename($file_path));
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,6 @@ class Company extends BaseModel
|
||||
'country_id' => 'string',
|
||||
'custom_fields' => 'object',
|
||||
'settings' => 'object',
|
||||
'custom_fields' => 'object',
|
||||
'updated_at' => 'timestamp',
|
||||
'created_at' => 'timestamp',
|
||||
'deleted_at' => 'timestamp',
|
||||
|
@ -13,6 +13,7 @@ namespace App\Services\Credit;
|
||||
|
||||
use App\Jobs\Entity\CreateEntityPdf;
|
||||
use App\Services\AbstractService;
|
||||
use App\Utils\TempFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class GetCreditPdf extends AbstractService
|
||||
@ -48,6 +49,9 @@ class GetCreditPdf extends AbstractService
|
||||
$file_path = CreateEntityPdf::dispatchNow($this->invitation);
|
||||
}
|
||||
|
||||
if(config('filesystems.default') == 's3')
|
||||
return TempFile::path(Storage::disk($disk)->url($file_path));
|
||||
|
||||
return Storage::disk($disk)->path($file_path);
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ use App\Jobs\Entity\CreateEntityPdf;
|
||||
use App\Models\ClientContact;
|
||||
use App\Models\Quote;
|
||||
use App\Services\AbstractService;
|
||||
use App\Utils\TempFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class GetQuotePdf extends AbstractService
|
||||
@ -46,6 +47,9 @@ class GetQuotePdf extends AbstractService
|
||||
$file_path = CreateEntityPdf::dispatchNow($invitation);
|
||||
}
|
||||
|
||||
if(config('filesystems.default') == 's3')
|
||||
return TempFile::path(Storage::disk($disk)->url($file_path));
|
||||
|
||||
return Storage::disk($disk)->path($file_path);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user