frontend: Improve file too large error (#3774)
* Improve file too large error Signed-off-by: IThundxr <me@ithundxr.dev> * MB -> MiB Signed-off-by: Prospector <6166773+Prospector@users.noreply.github.com> --------- Signed-off-by: IThundxr <me@ithundxr.dev> Signed-off-by: Prospector <6166773+Prospector@users.noreply.github.com> Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
This commit is contained in:
parent
1b1d41605b
commit
d24528f6a6
@ -19,7 +19,7 @@ export const useImageUpload = async (file: File, ctx: ImageUploadContext) => {
|
||||
|
||||
// Make sure file is less than 1MB
|
||||
if (file.size > 1024 * 1024) {
|
||||
throw new Error("File is too large");
|
||||
throw new Error("File exceeds the 1MiB size limit");
|
||||
}
|
||||
|
||||
const qs = new URLSearchParams();
|
||||
|
Loading…
x
Reference in New Issue
Block a user