mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 09:44:37 -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);
|
$file_path = $invoice->service()->getInvoicePdf($contact);
|
||||||
|
|
||||||
nlog($file_path);
|
|
||||||
|
|
||||||
return response()->download($file_path, basename($file_path));
|
return response()->download($file_path, basename($file_path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,6 @@ class Company extends BaseModel
|
|||||||
'country_id' => 'string',
|
'country_id' => 'string',
|
||||||
'custom_fields' => 'object',
|
'custom_fields' => 'object',
|
||||||
'settings' => 'object',
|
'settings' => 'object',
|
||||||
'custom_fields' => 'object',
|
|
||||||
'updated_at' => 'timestamp',
|
'updated_at' => 'timestamp',
|
||||||
'created_at' => 'timestamp',
|
'created_at' => 'timestamp',
|
||||||
'deleted_at' => 'timestamp',
|
'deleted_at' => 'timestamp',
|
||||||
|
@ -13,6 +13,7 @@ namespace App\Services\Credit;
|
|||||||
|
|
||||||
use App\Jobs\Entity\CreateEntityPdf;
|
use App\Jobs\Entity\CreateEntityPdf;
|
||||||
use App\Services\AbstractService;
|
use App\Services\AbstractService;
|
||||||
|
use App\Utils\TempFile;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class GetCreditPdf extends AbstractService
|
class GetCreditPdf extends AbstractService
|
||||||
@ -48,6 +49,9 @@ class GetCreditPdf extends AbstractService
|
|||||||
$file_path = CreateEntityPdf::dispatchNow($this->invitation);
|
$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);
|
return Storage::disk($disk)->path($file_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ use App\Jobs\Entity\CreateEntityPdf;
|
|||||||
use App\Models\ClientContact;
|
use App\Models\ClientContact;
|
||||||
use App\Models\Quote;
|
use App\Models\Quote;
|
||||||
use App\Services\AbstractService;
|
use App\Services\AbstractService;
|
||||||
|
use App\Utils\TempFile;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class GetQuotePdf extends AbstractService
|
class GetQuotePdf extends AbstractService
|
||||||
@ -46,6 +47,9 @@ class GetQuotePdf extends AbstractService
|
|||||||
$file_path = CreateEntityPdf::dispatchNow($invitation);
|
$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);
|
return Storage::disk($disk)->path($file_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user