Add custom upload confirmation and flatten folder uploads to individual files.
Deploy Ladill Transfer / deploy (push) Successful in 35s
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:
@@ -166,4 +166,26 @@ class TransferFilesTest extends TestCase
|
||||
$this->assertDatabaseHas('transfer_files', ['original_name' => 'brief.pdf']);
|
||||
$this->assertDatabaseHas('transfer_files', ['original_name' => 'brief (1).pdf']);
|
||||
}
|
||||
|
||||
public function test_upload_stores_basename_when_folder_path_in_filename(): void
|
||||
{
|
||||
Storage::fake('qr');
|
||||
$this->fakeTransferBillingApi();
|
||||
|
||||
$user = $this->createUser();
|
||||
|
||||
$this->actingAs($user)
|
||||
->post(route('transfer.files.upload'), [
|
||||
'files' => [
|
||||
UploadedFile::fake()->createWithContent(
|
||||
'red-logo/icon.svg',
|
||||
'<svg></svg>',
|
||||
),
|
||||
],
|
||||
])
|
||||
->assertRedirect();
|
||||
|
||||
$this->assertDatabaseHas('transfer_files', ['original_name' => 'icon.svg']);
|
||||
$this->assertDatabaseMissing('transfer_files', ['original_name' => 'red-logo/icon.svg']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user