谁告诉我Jspsmartupload的上传路径如何自己修改呀!立刻给分!

shaokun305 2003-06-04 04:32:52
谁告诉我Jspsmartupload的上传路径如何自己修改呀!立刻给分!
我想改变他的上传路径!
...全文
46 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
xqi8 2003-06-05
  • 打赏
  • 举报
回复
windows 下测试过。是完全可以的。
thkact 2003-06-04
  • 打赏
  • 举报
回复
我在windows 下测试过。是完全可以的。
zhoujuntao9344 2003-06-04
  • 打赏
  • 举报
回复
up
shaokun305 2003-06-04
  • 打赏
  • 举报
回复
我在windows下使用的,还可以
thkact 2003-06-04
  • 打赏
  • 举报
回复
newFile.saveAs("d:/websrc/upload/" + newFile.getFileName());//修改你的存储路径
改为:
newFile.saveAs("/upload" + newFile.getFileName());//修改你的存储路径

/upload 为web server 的根目录下的所要上传文件的目录。

顺便问一下:你在linux 服务器下。能上传所有文件吗?我有些文件不能上传!!!

moumouren 2003-06-04
  • 打赏
  • 举报
回复
<%@ page contentType="text/html; charset=gb2312" buffer="1" autoFlush="true"%>

<%@ page import="com.jspsmart.upload.*" %>
<body>

<%
SmartUpload upload = new SmartUpload();
upload.initialize(pageContext);
upload.upload();
for (int i=0;i<upload.getFiles().getCount();i++){
com.jspsmart.upload.File newFile = upload.getFiles().getFile(i);

if (!newFile.isMissing()) {

newFile.saveAs("d:/websrc/upload/" + newFile.getFileName());//修改你的存储路径
out.println("FieldName = " + newFile.getFieldName() + "<BR>");
out.println("Size = " + newFile.getSize() + "<BR>");
out.println("FileName = " + newFile.getFileName() + "<BR>");
out.println("FileExt = " + newFile.getFileExt() + "<BR>");
out.println("FilePathName = " + newFile.getFilePathName() + "<BR>");
out.println("ContentType = " + newFile.getContentType() + "<BR>");
out.println("ContentDisp = " + newFile.getContentDisp() + "<BR>");
out.println("TypeMIME = " + newFile.getTypeMIME() + "<BR>");
out.println("SubTypeMIME = " + newFile.getSubTypeMIME() + "<BR>");

}

}
%>
</body>

81,094

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧