Fix upload image profile and portofolio
This commit is contained in:
@@ -24,6 +24,7 @@ export function ComponentGlobal_ButtonUploadFileImage({
|
||||
|
||||
if (files.size > MAX_SIZE) {
|
||||
ComponentGlobal_NotifikasiPeringatan(PemberitahuanMaksimalFile);
|
||||
return;
|
||||
} else {
|
||||
onSetFile(files);
|
||||
onSetImage(buffer);
|
||||
|
||||
@@ -54,6 +54,8 @@ export async function funGlobal_UploadToStorage({
|
||||
|
||||
if (res.ok) {
|
||||
const dataRes = await res.json();
|
||||
// const cekLog = await res.text();
|
||||
// console.log(cekLog);
|
||||
return { success: true, data: dataRes.data };
|
||||
} else {
|
||||
const errorText = await res.text();
|
||||
|
||||
@@ -10,18 +10,16 @@ import {
|
||||
Image,
|
||||
rem,
|
||||
ScrollArea,
|
||||
Skeleton,
|
||||
Text,
|
||||
Title,
|
||||
Skeleton
|
||||
} from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { IconX } from "@tabler/icons-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { MainColor } from "../color";
|
||||
import ComponentGlobal_Loader from "../component/loader";
|
||||
import UIGlobal_LayoutHeaderTamplate from "./ui_header_tamplate";
|
||||
import { UIHeader } from "./ui_layout_tamplate";
|
||||
import ComponentGlobal_Loader from "../component/loader";
|
||||
|
||||
export function UIGlobal_ImagePreview({ fileId }: { fileId: string }) {
|
||||
const router = useRouter();
|
||||
|
||||
Reference in New Issue
Block a user