How to set up API routes for Filenest in a Next.js app.
The Next.js adapter only works with route handlers inside the app directory.
Create the following file structure:
Your folder structure may differ depending on your project setup.
Just make sure there is a main folder for Filenest routes (e.g. media) and a catch-all route (e.g. [action]).
Then just initialize the adapter inside the route.ts file and pass it a provider.
Now you're all set to build your UI. Check out the minimal setup to get started.