mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(server): immich checksum header (#9229)
* feat: dedupe by checksum header * chore: open api
This commit is contained in:
parent
16706f7f49
commit
ec4eb7cd19
17 changed files with 165 additions and 19 deletions
|
|
@ -1524,8 +1524,9 @@ export function getAssetThumbnail({ format, id, key }: {
|
|||
...opts
|
||||
}));
|
||||
}
|
||||
export function uploadFile({ key, createAssetDto }: {
|
||||
export function uploadFile({ key, xImmichChecksum, createAssetDto }: {
|
||||
key?: string;
|
||||
xImmichChecksum?: string;
|
||||
createAssetDto: CreateAssetDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
|
|
@ -1536,7 +1537,10 @@ export function uploadFile({ key, createAssetDto }: {
|
|||
}))}`, oazapfts.multipart({
|
||||
...opts,
|
||||
method: "POST",
|
||||
body: createAssetDto
|
||||
body: createAssetDto,
|
||||
headers: oazapfts.mergeHeaders(opts?.headers, {
|
||||
"x-immich-checksum": xImmichChecksum
|
||||
})
|
||||
})));
|
||||
}
|
||||
export function getAssetInfo({ id, key }: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue