Skip to content

Commit e74e521

Browse files
authored
Fix upload error (codesandbox#3273)
1 parent 6bd7046 commit e74e521

File tree

1 file changed

+9
-5
lines changed
  • packages/app/src/app/overmind/namespaces/files

1 file changed

+9
-5
lines changed

packages/app/src/app/overmind/namespaces/files/actions.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -427,12 +427,16 @@ export const filesUploaded: AsyncAction<{
427427
});
428428
} catch (error) {
429429
if (error.message.indexOf('413') !== -1) {
430-
return;
430+
actions.internal.handleError({
431+
message: `The uploaded file is bigger than 7MB, contact [email protected] if you want to raise this limit`,
432+
error,
433+
});
434+
} else {
435+
actions.internal.handleError({
436+
message: 'Unable to upload files',
437+
error,
438+
});
431439
}
432-
actions.internal.handleError({
433-
message: 'Unable to upload files',
434-
error,
435-
});
436440
}
437441

438442
actions.internal.closeModals(false);

0 commit comments

Comments
 (0)