Merge remote-tracking branch 'origin/exif_metadata'

# Conflicts:
#	public/mix-manifest.json
#	resources/js/App.vue
#	resources/js/components/FilesView/ImageMetaData.vue
#	resources/js/components/FilesView/InfoSidebar.vue
#	resources/js/components/FilesView/SearchBar.vue
#	resources/js/components/Spotlight/Spotlight.vue
#	resources/js/views/Shared.vue
#	src/Domain/Files/Resources/FileResource.php
This commit is contained in:
Čarodej
2022-02-25 18:23:08 +01:00
16 changed files with 358 additions and 143 deletions

View File

@@ -385,4 +385,37 @@ class FileTest extends TestCase
);
});
}
/**
* @test
*/
public function it_store_file_exif_data_after_file_upload()
{
$file = UploadedFile::fake()
->image('fake-image.jpg', 2000, 2000);
$user = User::factory()
->hasSettings()
->create();
$this
->actingAs($user)
->postJson('/api/upload', [
'filename' => $file->name,
'file' => $file,
'parent_id' => null,
'path' => '/' . $file->name,
'is_last' => 'true',
])->assertStatus(201);
$file = File::first();
$this->assertDatabaseHas('exifs', [
'file_id' => $file->id,
'height' => 2000,
'width' => 2000,
]);
}
}