So I am using Next Js 15(latest version) and useActionState
to submit a file with a file attachment. The file is of the aforementioned size. How do I upload it to my server. I am running aws and everything is inhouse, no AWS/GCP etc.
I was able to do it in earlier version of nextjs but somehow this upgrade added some limitations.
GET /upload 200 in 3086ms
⨯ TypeError: fetch failed
at async fileUploadAction (src\app\(loggedIn)\upload\actions.tsx:16:19)
14 | }
15 |
> 16 | const response = await fetch(benposFileUploadLink, {
| ^
17 | method: "POST",
18 | headers: {
19 | Authorization: `Token ${accessToken}`, {
digest: '1827344237',
[cause]: [Error [HeadersTimeoutError]: Headers Timeout Error] {
code: 'UND_ERR_HEADERS_TIMEOUT'
}
}
POST /upload 500 in 339566ms