【发布时间】:2017-01-15 11:47:19
【问题描述】:
<html lang="en">
<head>
<title>File Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<form method="POST" action="upload" enctype="multipart/form-data" >
File:
<input type="file" name="file" id="file" /> <br/>
Destination:
<input type="text" value="/tmp" name="destination"/>
</br>
<input type="submit" value="Upload" name="upload" id="upload" />
</form>
</body>
我想获取通过浏览器选择的所有文件路径(input type="file") 将其上传到 ftp 服务器。
我找到了很多代码快照,但只是它们给了我文件名,我需要绝对路径,例如“c:\users\filename”。
感谢您的宝贵时间。
【问题讨论】:
标签: java file-upload inputstream absolute-path input-type-file