Fix file image

Deskripsi:
- Ukuran file yang di ambil dari server wibu di batasi menjadi maksimal hanya 500kb
This commit is contained in:
2024-12-12 00:49:10 +08:00
parent 01c0e87cd0
commit 9046316b9e
24 changed files with 84 additions and 89 deletions

View File

@@ -17,7 +17,7 @@ export function ComponentGlobal_LoaderAvatar({
}) {
const [isImage, setIsImage] = useState<boolean | null>(null);
const url = APIs.GET({ fileId: fileId, size: imageSize });
const url = APIs.GET({ fileId: fileId, size: imageSize ? imageSize : "400" });
useShallowEffect(() => {
onLoadImage();

View File

@@ -24,7 +24,7 @@ export function ComponentGlobal_LoadImage({
const [isImage, setIsImage] = useState<boolean | null>(null);
const [isLoading, setIsLoading] = useState(false);
const url = APIs.GET({ fileId: fileId });
const url = APIs.GET({ fileId: fileId, size: "500" });
useShallowEffect(() => {
onLoadImage();

View File

@@ -15,7 +15,7 @@ export function ComponentGlobal_LoadImageCustom({
height: number;
}) {
const [isImage, setIsImage] = useState<boolean | null>(null);
const url = APIs.GET({ fileId: fileId });
const url = APIs.GET({ fileId: fileId, size: "500" });
useShallowEffect(() => {
onLoadImage();

View File

@@ -16,7 +16,7 @@ export function ComponentGlobal_LoadImageLandscape({
const router = useRouter();
const [isImage, setIsImage] = useState<boolean | null>(null);
const [isLoading, setLoading] = useState(false);
const url = APIs.GET({ fileId: fileId });
const url = APIs.GET({ fileId: fileId, size: "500" });
useShallowEffect(() => {
onLoadImage();

View File

@@ -22,7 +22,7 @@ export function ComponentGlobal_NotUserLoadImage({
const [isImage, setIsImage] = useState<boolean | null>(null);
const [isLoading, setIsLoading] = useState(false);
const url = APIs.GET({ fileId: fileId });
const url = APIs.GET({ fileId: fileId , size: "500" });
useShallowEffect(() => {
onLoadImage();