fix: image response handler

This commit is contained in:
jialin
2025-11-12 19:55:31 +08:00
parent e8eea9573e
commit a34c375e2d
2 changed files with 97 additions and 58 deletions
+1 -8
View File
@@ -78,14 +78,7 @@ export const fetchChunkedData = async (params: {
if (!response.ok) {
return await errorHandler(response);
}
const reader = response?.body?.getReader();
const decoder = new TextDecoder('utf-8', {
fatal: true
});
return {
reader,
decoder
};
return response.json();
};
const createFormData = (data: any): FormData => {