mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-13 04:33:42 +08:00
fix: build
This commit is contained in:
@@ -122,7 +122,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> {
|
||||
if (!window._SW_ENABLED) {
|
||||
// if serviceWorker register error, using compressImage
|
||||
return compressImage(file, 256 * 1024);
|
||||
@@ -137,7 +137,7 @@ export function uploadImage(file: File): Promise<string> {
|
||||
})
|
||||
.then((res) => res.json())
|
||||
.then((res) => {
|
||||
console.log("res", res);
|
||||
// console.log("res", res);
|
||||
if (res?.code == 0 && res?.data) {
|
||||
return res?.data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user