mirror of
https://github.com/immich-app/immich.git
synced 2025-07-08 10:44:15 -04:00
fix web
This commit is contained in:
parent
742599d1d1
commit
95adc02fcb
@ -11,6 +11,7 @@ import {
|
|||||||
} from '@api';
|
} from '@api';
|
||||||
import { handleError } from './handle-error';
|
import { handleError } from './handle-error';
|
||||||
import { DateTime } from 'luxon';
|
import { DateTime } from 'luxon';
|
||||||
|
import type { AxiosProgressEvent } from 'axios';
|
||||||
|
|
||||||
export const addAssetsToAlbum = async (albumId: string, assetIds: Array<string>): Promise<BulkIdResponseDto[]> =>
|
export const addAssetsToAlbum = async (albumId: string, assetIds: Array<string>): Promise<BulkIdResponseDto[]> =>
|
||||||
api.albumApi
|
api.albumApi
|
||||||
@ -125,8 +126,8 @@ export const downloadFile = async (asset: AssetResponseDto) => {
|
|||||||
{ id, key: api.getKey() },
|
{ id, key: api.getKey() },
|
||||||
{
|
{
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
onDownloadProgress: (event: ProgressEvent) => {
|
onDownloadProgress: (event: AxiosProgressEvent) => {
|
||||||
if (event.lengthComputable) {
|
if (event.total !== undefined) {
|
||||||
downloadManager.update(downloadKey, event.loaded, event.total);
|
downloadManager.update(downloadKey, event.loaded, event.total);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -84,7 +84,9 @@ async function fileUploader(asset: File, albumId: string | undefined = undefined
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
onUploadProgress: ({ loaded, total }) => {
|
onUploadProgress: ({ loaded, total }) => {
|
||||||
|
if (total) {
|
||||||
uploadAssetsStore.updateProgress(deviceAssetId, loaded, total);
|
uploadAssetsStore.updateProgress(deviceAssetId, loaded, total);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user