CodePudding user response:
After uploading the absolute path? Save position + file nameCodePudding user response:
Is the path of the upload before, now I get the upload of the file name, but don't get the file path + name of the filetry {
ListListForms=upload. ParseRequest (request);
For (FileItem FileItem: listForms) {
//determine whether each form element common form
If (fileItem isFormField ()) {
System. The out. Println (fileItem. Get string (" utf-8 "));
} else {
The String fileName=fileItem. GetName ();
FileName=fileName. The substring (fileName. LastIndexOf (" \ \ ") + 1);
System.out.println(fileName);
}
}
} the catch (FileUploadException e) {
e.printStackTrace();
}