_ _ dirname is the current directory, not the project root.
the initial question is that I want to put all the uploaded files in the upload directory under the root directory of the project, but how do I get this root directory?
consider storing _ _ dirname in the properties of app in app.js in the root directory, but how to access app in subsequent middleware? Some middleware can wrap app when calling, such as router (app), but some don"t, only ctx. Can you access app from ctx?
Thank you.