You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-16 03:40:33 +02:00
feat(server): immich checksum header (#9229)
* feat: dedupe by checksum header * chore: open api
This commit is contained in:
@ -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 }: {
|
||||
|
Reference in New Issue
Block a user