document.getElementById('avatar-upload')?.click()}
+ onClick={() =>
+ document
+ .getElementById("avatar-upload")
+ ?.click()
+ }
>
- {field.value?.startsWith('data:') ? (
+ {field.value?.startsWith("data:") ? (

) : (
-
@@ -313,12 +335,15 @@ export const ProfileForm = () => {
if (file) {
// max file size 5mb
if (file.size > 5 * 1024 * 1024) {
- toast.error('Image size must be less than 5MB');
+ toast.error(
+ "Image size must be less than 5MB",
+ );
return;
}
const reader = new FileReader();
reader.onload = (event) => {
- const result = event.target?.result as string;
+ const result = event.target
+ ?.result as string;
field.onChange(result);
};
reader.readAsDataURL(file);
From fa4724d94e07e3ba65580fdd17e529095f4a47d4 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sun, 5 Oct 2025 00:35:10 -0600
Subject: [PATCH 3/3] Update profile-form.tsx
---
.../components/dashboard/settings/profile/profile-form.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx b/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
index e922d8256..c481d5b8b 100644
--- a/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
+++ b/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
@@ -333,10 +333,10 @@ export const ProfileForm = () => {
onChange={async (e) => {
const file = e.target.files?.[0];
if (file) {
- // max file size 5mb
- if (file.size > 5 * 1024 * 1024) {
+ // max file size 2mb
+ if (file.size > 2 * 1024 * 1024) {
toast.error(
- "Image size must be less than 5MB",
+ "Image size must be less than 2MB",
);
return;
}