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';
|
||||
import { handleError } from './handle-error';
|
||||
import { DateTime } from 'luxon';
|
||||
import type { AxiosProgressEvent } from 'axios';
|
||||
|
||||
export const addAssetsToAlbum = async (albumId: string, assetIds: Array<string>): Promise<BulkIdResponseDto[]> =>
|
||||
api.albumApi
|
||||
@ -125,8 +126,8 @@ export const downloadFile = async (asset: AssetResponseDto) => {
|
||||
{ id, key: api.getKey() },
|
||||
{
|
||||
responseType: 'blob',
|
||||
onDownloadProgress: (event: ProgressEvent) => {
|
||||
if (event.lengthComputable) {
|
||||
onDownloadProgress: (event: AxiosProgressEvent) => {
|
||||
if (event.total !== undefined) {
|
||||
downloadManager.update(downloadKey, event.loaded, event.total);
|
||||
}
|
||||
},
|
||||
|
@ -84,7 +84,9 @@ async function fileUploader(asset: File, albumId: string | undefined = undefined
|
||||
},
|
||||
{
|
||||
onUploadProgress: ({ loaded, total }) => {
|
||||
uploadAssetsStore.updateProgress(deviceAssetId, loaded, total);
|
||||
if (total) {
|
||||
uploadAssetsStore.updateProgress(deviceAssetId, loaded, total);
|
||||
}
|
||||
},
|
||||
},
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user