support multiple image upload

This commit is contained in:
Piyush Mishra 2023-11-23 10:59:55 +05:30
parent 1f61d02da6
commit ed27184f5a
3 changed files with 5 additions and 10 deletions

View File

@ -269,8 +269,7 @@ function App() {
doGenerateCode(
{
generationType: "create",
image: referenceImages[0],
inputMode,
images: referenceImages,
},
currentVersion
);
@ -303,8 +302,7 @@ function App() {
doGenerateCode(
{
generationType: "update",
inputMode,
image: referenceImages[0],
images: referenceImages,
resultImage: resultImage,
history: updatedHistory,
isImportedFromCode,
@ -315,8 +313,7 @@ function App() {
doGenerateCode(
{
generationType: "update",
inputMode,
image: referenceImages[0],
images: referenceImages,
history: updatedHistory,
isImportedFromCode,
},

View File

@ -69,8 +69,7 @@ function ImageUpload({ setReferenceImages }: Props) {
const { getRootProps, getInputProps, isFocused, isDragAccept, isDragReject } =
useDropzone({
maxFiles: 1,
maxSize: 1024 * 1024 * 20, // 20 MB
maxSize: 1024 * 1024 * 5, // 5 MB
accept: {
// Image formats
"image/png": [".png"],

View File

@ -32,8 +32,7 @@ export enum ScreenRecorderState {
export interface CodeGenerationParams {
generationType: "create" | "update";
inputMode: "image" | "video";
image: string;
images: string[];
resultImage?: string;
history?: string[];
isImportedFromCode?: boolean;