Skip to content

Let's use AI to Earn!

12

DESKTOP-EMF2SH4\Administratorfee85d4ddb81
diff --git a/src/api/youtube.ts b/src/api/youtube.ts
index 18dac638..0a5ba4ab 100644
--- a/src/api/youtube.ts
+++ b/src/api/youtube.ts
@@ -21,9 +21,9 @@ export const uploadYouTubeVideoApi = (data: FormData) => {
return request({
url: '/plat/youtube/videos/upload',
method: 'POST',
- data,
- headers: {
- 'Content-Type': 'multipart/form-data',
- },
+ body: data,
+ // headers: {
+ // 'Content-Type': 'multipart/form-data',
+ // },
});
};
\ No newline at end of file
diff --git a/src/app/[lng]/youtube/page.tsx b/src/app/[lng]/youtube/page.tsx
index c0ecc234..13110af2 100644
--- a/src/app/[lng]/youtube/page.tsx
+++ b/src/app/[lng]/youtube/page.tsx
@@ -74,7 +74,7 @@ const YouTubeAuth: React.FC = () => {
setUploadLoading(true);
try {
const formData = new FormData();
- formData.append('video', file);
+ formData.append('file', file);
formData.append('accountId', "117748783778429701407");
const response = await uploadYouTubeVideoApi(formData);
diff --git a/src/utils/FetchService/FetchService.ts b/src/utils/FetchService/FetchService.ts
index ee5877ff..a2925919 100644
--- a/src/utils/FetchService/FetchService.ts
+++ b/src/utils/FetchService/FetchService.ts
@@ -31,6 +31,8 @@ class FetchService<T = Response> {
}
public async request(requestParams: RequestParams): Promise<T> {
+ console.log(requestParams);
+
return new Promise(async (resolve, reject) => {
// 请求拦截
if (this.requestInterceptor) {