我用from表单提交一个file怎么在后台获取这个file的绝对路径(框架式Spring+Sprin 财富值27

2016-10-27 01:36发布

<tr class="soundName">
<td>本地URL</td><td><input type="text" id="soundName" name="soundName" value="" > </td>
</tr>
<tr class="nativeUrl">

            <td>${(cmodel.voiceServices_nativeUrl)!'}</td><td><input type="file" id="nativeUrl" name="nativeUrl" value="" enctype="multipart/form-data"/></td>         </tr> 

贴错代码了

付费偷看设置
发送
1条回答
小米哥哥2 - 这个人很懒,什么都没留下
1楼 · 2016-10-27 02:13.采纳回答

如果你要的是“文件缓存在服务端的绝对路径的话”,应该是不存在的,Spring 后台接收的应该是文件流,不过你可以把它转成文件实体存到任何地方。(不太确定,按常识判断)

一周热门 更多>