更改ice:inputFile组件的上传目录路径
我注意到ice:inputFile组件只会将文件上传到目录$TOMCAT_HOME/webapps/MyAppName/upload/。我希望此目录依赖于当前用户的用户缩写(即缩写为 abc 的用户想要上传文件,该文件位于 $TOMCAT_HOME/webapps/MyAppName/upload/abc/)。如何动态设置该属性?
I've noticed that the ice:inputFile component will only upload files to the directory $TOMCAT_HOME/webapps/MyAppName/upload/. I want this directory to be dependent on the user initials for the current user (i.e. user with initials abc wants to upload a file, the file goes to $TOMCAT_HOME/webapps/MyAppName/upload/abc/). How can I dynamically set this attribute?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如参考指南中所示
http://www.icefaces.org/docs/v1_8_2/htmlguide/devguide /references5.html
web.xml 文件:
要指定存储上传文件的目录位置,使用以下参数:
此参数与ice:inputFile 组件属性“uniqueFolder”结合使用,具有四种可能的组合,如下所示:
注意:可以在每个实例上覆盖通过上述配置参数指定的默认上传目录通过ice:inputFile 组件上的uploadDirectory 和uploadDirectoryAbsolute 属性来实现。
希望这有帮助!
As indicated in the reference guide
http://www.icefaces.org/docs/v1_8_2/htmlguide/devguide/references5.html
web.xml file:
To specify the directory location where uploaded files are stored, the following parameter is used:
This parameter works in conjunction with the ice:inputFile component attribute "uniqueFolder" with four possible combinations as illustrated below:
Note: The default upload directory specified via the configuration parameters above can be overridden on a per-instance basis via the uploadDirectory and uploadDirectoryAbsolute attributes on the ice:inputFile component.
Hope this helps!
需要在组件上设置 uploadDirectory 属性,如下所示:
ICEFaces 站点。
Need to set the property uploadDirectory on the component, as such:
This property is (currently) not mentioned in the JavaDoc for this component on the ICEFaces site.