Add chunked uploads and raise storage rate to GHS 0.30/GB/month.
Deploy Ladill Transfer / deploy (push) Successful in 39s

Large files upload in 5 MB chunks (hosting file manager pattern) for the
transfer UI and Ladill Mail S2S API, with no app-level file size cap when
TRANSFER_MAX_FILE_BYTES=0.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-08 12:07:27 +00:00
co-authored by Cursor
parent fb131cd7fa
commit 65b634bb0b
23 changed files with 797 additions and 27 deletions
@@ -23,8 +23,12 @@ class TransferController extends Controller
return response()->json(['message' => 'Forbidden.'], 403);
}
$maxKb = (int) ceil(((int) config('transfer.max_file_bytes', 524288000)) / 1024);
$maxBytes = (int) config('transfer.max_file_bytes', 0);
$maxFiles = (int) config('transfer.max_files_per_transfer', 20);
$fileRules = ['required', 'file'];
if ($maxBytes > 0) {
$fileRules[] = 'max:'.(int) ceil($maxBytes / 1024);
}
$data = $request->validate([
'mailbox' => ['required', 'email', 'max:255'],
@@ -32,7 +36,7 @@ class TransferController extends Controller
'message' => ['nullable', 'string', 'max:2000'],
'retention_days' => ['nullable', 'integer', 'min:1', 'max:365'],
'files' => ['required', 'array', 'min:1', 'max:'.$maxFiles],
'files.*' => ['required', 'file', 'max:'.$maxKb],
'files.*' => $fileRules,
]);
try {