reading from openapi spec

This commit is contained in:
2026-04-01 18:06:09 +05:30
parent 3b472242a7
commit 344106f1a4
9 changed files with 265 additions and 103 deletions

View File

@@ -1,6 +1,4 @@
import * as React from "react";
import { Box, Button, Avatar, CircularProgress, Typography } from "@mui/material";
import { config } from "../../config";
interface ImageUploadFieldProps {
label?: string;
@@ -8,6 +6,7 @@ interface ImageUploadFieldProps {
uploading?: boolean;
onUpload: (file: File) => void;
size?: number;
baseUrl: string;
}
export default function ImageUploadField({
@@ -16,10 +15,11 @@ export default function ImageUploadField({
uploading = false,
onUpload,
size = 64,
baseUrl,
}: ImageUploadFieldProps) {
const imgSrc = value
? config.baseUrl.replace(/\/+$/, "") +
? baseUrl.replace(/\/+$/, "") +
"/" +
value.replace(/^\/+/, "")
: "";