fix: make admin media uploads reliable

This commit is contained in:
Server Migration
2026-08-16 17:03:36 +03:30
parent b64f528c0d
commit 861773b05b
9 changed files with 119 additions and 28 deletions
+5 -1
View File
@@ -43,4 +43,8 @@ export const apiSaveRegisterData = (data) => http.post(endpoints.registerData, {
export const apiGetRegistrationQuestionVideo = () =>
http.get(endpoints.getRegistrationQuestionVideo)
export const apiUploadMedia = (formData) => http.post(endpoints.uploadMedia, formData)
// Media uploads (especially course videos) can legitimately take several
// minutes on slower connections. Keep the normal API timeout short, but give
// this endpoint enough time to complete the backend's 300 MB upload contract.
export const apiUploadMedia = (formData) =>
http.post(endpoints.uploadMedia, formData, { timeout: 10 * 60 * 1000 })