You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My project is based on NextJS 9 custom server. Custom server is Express v4.
I upload files through the multipart form to the server into /public/static/ folder by multer.
In production mode I always receive response with 404 code for GET-requests to just uploaded files.
After server restart I receive response with 200 code for all previously uploaded files and 404 code for new uploads only.
This issue does not exist in developer mode.
Problem is not present only if
server.js contained: const nextApp = nextjs({ dev });
and server launch command is: $ nodemon server.js
This discussion was converted from issue #17202 on September 21, 2020 12:43.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
My project is based on NextJS 9 custom server. Custom server is Express v4.
I upload files through the multipart form to the server into /public/static/ folder by multer.
In production mode I always receive response with 404 code for GET-requests to just uploaded files.
After server restart I receive response with 200 code for all previously uploaded files and 404 code for new uploads only.
This issue does not exist in developer mode.
Problem is not present only if
server.js contained:
const nextApp = nextjs({ dev });
and server launch command is:
$ nodemon server.js
Versions tested:
github project page
Beta Was this translation helpful? Give feedback.
All reactions