feat(server): return asset checksum (#2582)

* feat: return asset checksum

* chore: generate open api

* chore: coverage

* feat(server): support base64 hashes in bulk upload check:

* chore: generate open api
This commit is contained in:
Jason Rasmussen
2023-05-27 21:56:17 -04:00
committed by GitHub
parent 7f0ad8e2d2
commit bca4626708
17 changed files with 111 additions and 103 deletions

View File

@@ -378,7 +378,7 @@ export interface AssetBulkUploadCheckItem {
*/
'id': string;
/**
*
* base64 or hex encoded sha1 hash
* @type {string}
* @memberof AssetBulkUploadCheckItem
*/
@@ -586,10 +586,10 @@ export interface AssetResponseDto {
'originalFileName': string;
/**
*
* @type {string}
* @type {boolean}
* @memberof AssetResponseDto
*/
'resizePath': string | null;
'resized': boolean;
/**
*
* @type {string}
@@ -632,18 +632,6 @@ export interface AssetResponseDto {
* @memberof AssetResponseDto
*/
'duration': string;
/**
*
* @type {string}
* @memberof AssetResponseDto
*/
'webpPath': string | null;
/**
*
* @type {string}
* @memberof AssetResponseDto
*/
'encodedVideoPath'?: string | null;
/**
*
* @type {ExifResponseDto}
@@ -674,6 +662,12 @@ export interface AssetResponseDto {
* @memberof AssetResponseDto
*/
'people'?: Array<PersonResponseDto>;
/**
* base64 encoded sha1 hash
* @type {string}
* @memberof AssetResponseDto
*/
'checksum': string;
}

View File

@@ -350,7 +350,7 @@
<div class="row-start-1 row-span-full col-start-1 col-span-4">
{#key asset.id}
{#if !asset.resizePath}
{#if !asset.resized}
<div class="h-full w-full flex justify-center">
<div
class="h-full bg-gray-100 dark:bg-immich-dark-gray flex items-center justify-center aspect-square px-auto"

View File

@@ -123,7 +123,7 @@
</div>
{/if}
{#if asset.resizePath}
{#if asset.resized}
<ImageThumbnail
url={api.getAssetThumbnailUrl(asset.id, format, publicSharedKey)}
altText={asset.originalFileName}