remote upload for shared route

This commit is contained in:
Čarodej
2022-04-21 16:47:22 +02:00
parent e4dd9de931
commit 8be0ae2a62
23 changed files with 152 additions and 90 deletions

View File

@@ -371,7 +371,8 @@ class FolderTest extends TestCase
->create("fake-file-$index.pdf", 1200, 'application/pdf');
$this->postJson('/api/upload', [
'filename' => $file->name,
'name' => $file->name,
'extension' => 'pdf',
'file' => $file,
'parent_id' => $folder->id,
'path' => "/$file->name",

View File

@@ -30,7 +30,8 @@ class FolderUploadTest extends TestCase
$this
->actingAs($user)
->postJson('/api/upload', [
'filename' => $file->name,
'name' => $file->name,
'extension' => 'pdf',
'file' => $file,
'path' => '/',
'parent_id' => $folder->id,
@@ -59,7 +60,8 @@ class FolderUploadTest extends TestCase
$this
->actingAs($user)
->postJson('/api/upload', [
'filename' => $file->name,
'name' => $file->name,
'extension' => 'pdf',
'file' => $file,
'path' => "/level_1/level_2/level_3/$file->name",
'parent_id' => null,
@@ -69,7 +71,8 @@ class FolderUploadTest extends TestCase
$this
->actingAs($user)
->postJson('/api/upload', [
'filename' => $file->name,
'name' => $file->name,
'extension' => 'pdf',
'file' => $file,
'path' => "/level_1/level_2/level_3/$file->name",
'parent_id' => null,
@@ -127,7 +130,8 @@ class FolderUploadTest extends TestCase
$this
->actingAs($user)
->postJson('/api/upload', [
'filename' => $file->name,
'name' => $file->name,
'extension' => 'pdf',
'file' => $file,
'path' => "/another_folder/level_2/level_3/$file->name",
'parent_id' => null,
@@ -163,7 +167,8 @@ class FolderUploadTest extends TestCase
$this
->actingAs($user)
->postJson('/api/upload', [
'filename' => $brother->name,
'name' => $brother->name,
'extension' => 'pdf',
'file' => $brother,
'path' => "/Folder/Brother/$brother->name",
'parent_id' => null,
@@ -173,7 +178,8 @@ class FolderUploadTest extends TestCase
$this
->actingAs($user)
->postJson('/api/upload', [
'filename' => $sister->name,
'name' => $sister->name,
'extension' => 'pdf',
'file' => $sister,
'path' => "/Folder/Sister/$sister->name",
'parent_id' => null,