Add custom upload confirmation and flatten folder uploads to individual files.
Deploy Ladill Transfer / deploy (push) Successful in 35s

Users confirm uploads in a Ladill modal before transfer, and folder picks upload flat file names into the current location instead of preserving local directory paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-08 22:00:29 +00:00
co-authored by Cursor
parent 1f8f816f34
commit 14b00511ef
4 changed files with 230 additions and 4 deletions
+9 -1
View File
@@ -126,7 +126,7 @@ class FileStorageService
throw new RuntimeException($file->getClientOriginalName().' exceeds the maximum file size.');
}
$originalName = $file->getClientOriginalName() ?: 'file';
$originalName = $this->basenameFilename($file->getClientOriginalName() ?: 'file');
$resolution = $resolutions[$originalName] ?? null;
if ($resolution === 'replace') {
@@ -193,4 +193,12 @@ class FileStorageService
return $candidate;
}
private function basenameFilename(string $filename): string
{
$normalized = str_replace('\\', '/', trim($filename));
$base = basename($normalized);
return $base !== '' ? $base : 'file';
}
}