Store transfer files on Contabo Object Storage like Ladill Meet.
Deploy Ladill Transfer / deploy (push) Successful in 50s
Deploy Ladill Transfer / deploy (push) Successful in 50s
Add transfer-files S3 disk, config-driven uploads, and an artisan command to migrate existing local blobs to object storage. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -144,19 +144,25 @@ class TransferService
|
||||
$uuid = Str::uuid()->toString();
|
||||
$ext = $file->getClientOriginalExtension() ?: 'bin';
|
||||
$path = $user->id.'/transfers/'.$transfer->id.'/'.$uuid.'.'.$ext;
|
||||
$disk = $this->filesDisk();
|
||||
|
||||
$file->storeAs('', $path, 'qr');
|
||||
$file->storeAs('', $path, $disk);
|
||||
|
||||
return TransferFile::create([
|
||||
'transfer_id' => $transfer->id,
|
||||
'original_name' => $displayName,
|
||||
'disk' => 'qr',
|
||||
'disk' => $disk,
|
||||
'path' => $path,
|
||||
'mime_type' => $file->getMimeType() ?: 'application/octet-stream',
|
||||
'size_bytes' => (int) $file->getSize(),
|
||||
]);
|
||||
}
|
||||
|
||||
private function filesDisk(): string
|
||||
{
|
||||
return (string) config('transfer.files_disk', 'qr');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $data
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user