fix: remove or reupload avatar bug (#2502)

Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
This commit is contained in:
Piyush Gupta
2024-04-22 21:21:07 +05:30
committed by GitHub
parent e2d5727cfc
commit dc2ce17aa0
2 changed files with 4 additions and 1 deletions
@@ -52,6 +52,9 @@ export function EditAvatar({ session, environmentId }: { session: Session; envir
toast.error("Avatar update failed. Please try again."); toast.error("Avatar update failed. Please try again.");
} finally { } finally {
setIsLoading(false); setIsLoading(false);
if (inputRef.current) {
inputRef.current.value = "";
}
} }
}; };
+1 -1
View File
@@ -43,7 +43,7 @@ export const getS3Client = () => {
s3ClientInstance = new S3Client({ s3ClientInstance = new S3Client({
credentials, credentials,
region: S3_REGION, region: S3_REGION,
endpoint: S3_ENDPOINT_URL, ...(S3_ENDPOINT_URL && { endpoint: S3_ENDPOINT_URL }),
}); });
} }