Back

how to upload image in next js without cors error using appwrite

  • 0
  • Web
calipher
4 Jun, 2023, 03:36

how to upload image in next js without cors error using appwrite. I am sending image via jsx element but now in production i want to create a new api route can anyone help me

TL;DR
TL;DR: The user is looking for help on how to upload an image in Next.js without encountering a CORS error using Appwrite. They mention deploying the code to Vercel and inquire about where to add the Appwrite console settings. The solution provided is to add the web platform in the Appwrite console with the frontend domain as the host.
Binyamin
4 Jun, 2023, 03:39

If yhe action is done on the client side of nextjs then you'll need to add your app URL as Web platfrom in the Appwrite console

Binyamin
4 Jun, 2023, 03:39

Did you did that?

calipher
4 Jun, 2023, 03:41

wait let me see

calipher
4 Jun, 2023, 03:59

where sould i use it exactly

calipher
4 Jun, 2023, 03:59

i have deploye the code to vercel

Binyamin
4 Jun, 2023, 03:59

In the console in the overview page. You'll see an option to add platform. Add web and in the host put the frontend domain

Binyamin
4 Jun, 2023, 04:00

Appwrite console

calipher
4 Jun, 2023, 04:01

is this ok

Binyamin
4 Jun, 2023, 04:02

Yes

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more