Can we use gridfs in nextjs using server action
Answered
Rahul the Developer posted this in #help-forum
I have tried and I am successful in upload files
But only thing is when fetching using api routes,
I am getting this error:
The requested resource isn't a valid image for http://localhost:3000/api/profile/6ccdb3f922797331470b3b80607dd6a0d4292146.png received text/html; charset=utf-8
But only thing is when fetching using api routes,
I am getting this error:
The requested resource isn't a valid image for http://localhost:3000/api/profile/6ccdb3f922797331470b3b80607dd6a0d4292146.png received text/html; charset=utf-8
Answered by Rahul the Developer
Got the solution, it was bug from my side I have to use only '/api/' but previously I used 'localhost/api/' this gave me text/html error, my bad
3 Replies
Toyger
you need to check what are you getting in response, in chrome developer tools at Network tab
Got the solution, it was bug from my side I have to use only '/api/' but previously I used 'localhost/api/' this gave me text/html error, my bad
Answer