Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

3.6 GetFile file upload


May 14, 2021 JFinal manual



Controller provides the getFile family of methods to support file uploads. rs. Note in particular: If the client requests for multipart request (the form form uses enctype "multipart/form-data"), the getFile series method must be called before the getPara series method can work properly, because the multipart request requires the data in the request body to be parsed through the getFile series method, including parameters.


The file is uploaded by default to the upload subpath under the project root path, which is called the file upload base path. Y ou can set up a file upload base path in the JFinalConfig.configConstant (Constants me) method to facilitate stand-alone multi-instance deployment by accepting an absolute path that starts with "/" or starts with a windows disk character. When the path parameter is set to a relative path, is a relative path based on the root of the project.