Next.js files for route handlers

So I knew that route handlers are provisioned using a Netlify function. In my case, I’m using Next.js, and I need to upload a file to run (read locally) in the route handler. It’s an AI prompt endpoint, and the file, containing static data, provides the context for the AI to run. I don’t want to upload the file for all functions, just the one functions for that endpoint. How do I do this?

Hi, @msqr1. It would first help to understand your use-case better. Do you want users of your app to be able to upload files for each request to this route or do you want to include one file with the deployed function and then all invocations of that function will use the same file?