mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix(web): Handle upload failures from public users (#24826)
This commit is contained in:
@@ -125,6 +125,7 @@ async function fileUploader({
|
||||
}: FileUploaderParams): Promise<string | undefined> {
|
||||
const fileCreatedAt = new Date(assetFile.lastModified).toISOString();
|
||||
const $t = get(t);
|
||||
const wasInitiallyLoggedIn = !!get(user);
|
||||
|
||||
uploadAssetsStore.markStarted(deviceAssetId);
|
||||
|
||||
@@ -215,8 +216,9 @@ async function fileUploader({
|
||||
|
||||
return responseData.id;
|
||||
} catch (error) {
|
||||
// ignore errors if the user logs out during uploads
|
||||
if (!get(user)) {
|
||||
// If the user store no longer holds a user, it means they have logged out
|
||||
// In this case don't bother reporting any errors.
|
||||
if (wasInitiallyLoggedIn && !get(user)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user