mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 08:13:43 +08:00 
			
		
		
		
	fixed typescript error
This commit is contained in:
		@@ -253,17 +253,12 @@ export function Sd() {
 | 
			
		||||
                          onClick={async () => {
 | 
			
		||||
                            if (await showConfirm(Locale.Sd.Danger.Delete)) {
 | 
			
		||||
                              // remove img_data + remove item in list
 | 
			
		||||
                              removeImage(item.img_data).finally(
 | 
			
		||||
                                () => {
 | 
			
		||||
                                  sdStore.draw = sdImages.filter(
 | 
			
		||||
                                    (i: any) => i.id !== item.id,
 | 
			
		||||
                                  );
 | 
			
		||||
                                  sdStore.getNextId();
 | 
			
		||||
                                },
 | 
			
		||||
                                (error) => {
 | 
			
		||||
                                  console.error(error);
 | 
			
		||||
                                },
 | 
			
		||||
                              );
 | 
			
		||||
                              removeImage(item.img_data).finally(() => {
 | 
			
		||||
                                sdStore.draw = sdImages.filter(
 | 
			
		||||
                                  (i: any) => i.id !== item.id,
 | 
			
		||||
                                );
 | 
			
		||||
                                sdStore.getNextId();
 | 
			
		||||
                              });
 | 
			
		||||
                            }
 | 
			
		||||
                          }}
 | 
			
		||||
                        />
 | 
			
		||||
 
 | 
			
		||||
@@ -64,7 +64,7 @@ export function base64Image2Blob(base64Data: string, contentType: string) {
 | 
			
		||||
  return new Blob([byteArray], { type: contentType });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function uploadImage(file: File): Promise<string> {
 | 
			
		||||
export function uploadImage(file: Blob): Promise<string> {
 | 
			
		||||
  const body = new FormData();
 | 
			
		||||
  body.append("file", file);
 | 
			
		||||
  return fetch(UPLOAD_URL, {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user