如何使用jquery设置我的服务器上传文件的默认路径? [英] How to set default path to upload file on my server using jquery?

查看:141
本文介绍了如何使用jquery设置我的服务器上传文件的默认路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好大家



我想用jquery设置文件上传的默认路径(该路径与我网站上文件夹中的图像指定相关,例如:〜/ Upload / userfolder / userimage.dcm)



当用户点击浏览按钮时,用户只能看到自己的图像文件夹< br $> b $ b

谢谢

hello everyone

I want to set a default path for the file upload using jquery (the path is related to specify an image on the folder on my website, for example:" ~/Upload/userfolder/userimage.dcm")

When the user click on the browse button, the user just able to see own image folder

Thank you

推荐答案





查看此



<%= request.getContextPath()%> /Upload/userfolder/userimage.dcm



从<%= request.getContextPath()%>获取服务器路径



然后使用浏览文件路径。


check this

<%=request.getContextPath()%>/Upload/userfolder/userimage.dcm

get server path from <%=request.getContextPath()%>

and then apend browse file path.


这篇关于如何使用jquery设置我的服务器上传文件的默认路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆