上传大文件能用了,但上传后不能读取文件名,也不能定义存贮路经?????急啊

jiank008 2004-12-07 01:34:22
我用了ABCupload组件能上传上百M的文件,但我做不来怎么样和原来的相结合,读取出上传后的文件名和上传时的路经,
现在是在根目录下>

敬请高手指点>>??
...全文
155 13 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
hml999 2004-12-13
  • 打赏
  • 举报
回复
用户限制 <param name="MaxFileSize" value="512000000">

服务器限制 MaxFileSize=1048576000

用户限制 <= 服务器限制
jiank008 2004-12-13
  • 打赏
  • 举报
回复
这两个数之间有没什么规范,我改了还是不行?比如上传200M怎么改??
hml999 2004-12-10
  • 打赏
  • 举报
回复
要修改两个参数:
1、你的网页
<param name="MaxFileSize" value="512000000">

2、XUploadFiles.asp
MaxFileSize=1048576000
jiank008 2004-12-09
  • 打赏
  • 举报
回复
真的改了上传大小就不能上传了??是不是我哪改错了??请指教??能不能把你的上传给我看一下??
hml999 2004-12-08
  • 打赏
  • 举报
回复
只能上传10M的?不会吧,我传过100MB的。

几百MB,还是用FTP吧
jiank008 2004-12-07
  • 打赏
  • 举报
回复
hml999(蓝色999) ( ) 信誉:100
只能上传10M的,而我现在可以上传几百M的,这不是回去了吗?我现就是要把这两个合在一起?
Newrocky 2004-12-07
  • 打赏
  • 举报
回复
要传大文件吗?
用FTP吧!
看我的办法:)
http://community.csdn.net/Expert/topic/3623/3623329.xml?temp=.4106256
jiank008 2004-12-07
  • 打赏
  • 举报
回复
有没有源码.谢谢
hml999 2004-12-07
  • 打赏
  • 举报
回复
太复杂了,使用其他组件吧,如XUploadFiles
我是杨威利 2004-12-07
  • 打赏
  • 举报
回复
帮你顶一下。
jiank008 2004-12-07
  • 打赏
  • 举报
回复
没有人能帮帮我吗??我自顶了?
jiank008 2004-12-07
  • 打赏
  • 举报
回复


<td><font face="Verdana, Arial, Helvetica, sans-serif" size="1">

<span id=min></span> 分

<span id=secs></span> 秒

(<span id=BytesDone></span> KB of

<span id=BytesTotal></span> KB 已上传)</font></td>

</tr>

<tr>

<td><font face="Verdana, Arial, Helvetica, sans-serif" size="1">

传送速度:</font></td>

<td><font face="Verdana, Arial, Helvetica, sans-serif" size="1">

<span id=BytesPerSecond></span> KB/秒</font></td>

</tr>

<tr>

<td><font face="Verdana, Arial, Helvetica, sans-serif" size="1">信息:</font></td>

<td><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><span id=Information></span></font></td>

</tr>
<tr>
<td>
<input class="mailButton" type="button" value="粘 贴" name="btAdd" onclick="AddFile()" onMouseOver="onButton(this);" onMouseOut="offButton(this);"></td>

</tr>

</table>

</td>

</tr>

<tr></tr>

</table>

</div>
<iframe name="up" style="display:none"></iframe>
</td>
</tr>
<td>3、所有的附件粘贴完毕后,点【完成】按钮返回。
<input class="mailButton" type="button" value="完 成" name="btFinish" onclick="AddFinish()" onMouseOver="onButton(this);" onMouseOut="offButton(this);"></td>
</tr>
<tr>
<td>
选择粘贴的附件:
<%
Response.Write "<select name='sltAttachFile'>"

If Request.QueryString("UpLoad") = "Yes" Then
Call RecordAddMultiFileInfo()
Else
Call RecordMultiFileInfo()
End IF

If Session("FileNum") = "" Then
Response.Write "<script language=javascript>"
Response.Write "MultiEdit.btFinish.disabled = true;"
Response.Write "</script>"
Else
If Cint(Session("FileNum")) >=1 Then
Response.Write "<script language=javascript>"
Response.Write "MultiEdit.fSelectFile.disabled = false;" // true
Response.Write "</script>"
End If
End If

%>
<input class="mailButton" <%If Session("FileNum")="" Then Response.Write "disabled" End If%> align="absmiddle" type="button" value="删 除" name="btDelect" onclick="DelFile()" onMouseOver="onButton(this);" onMouseOut="offButton(this);">
</td>
</tr>
<tr>
<td>已经粘贴了 
<%
If Session("FileNum") = "" Then
Response.Write "<font color=red>0</font>"
Else
Response.Write "<font color=red>" & Session("FileNum") & "</font>"
End If
%>
 个附件。
</td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#f7f7f7">
<tr>
<td bgcolor="#999999" height="1"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" height="1"></td>
</tr>
<%If Session("FileNum") = "" Then%>
<tr>
<td align="center" height="38" bgcolor="#DEDBD6">
<input type="button" value="关闭窗口" class ="button" name="btClose" onclick="WindowClose()" onMouseOver="onButton(this);" onMouseOut="offButton(this);">
</td>
</tr>
<%End If%>
</table>
</td>
</tr>
</table>

</form>
<Script language="javascript">
<!--
function AddFinish()
{
window.opener.MyForm.txtAttach.value = ""; //先清空原有信息
for(var i = 0;i< <% If Session("FileNum") <> "" then Response.write Session("FileNum") else Response.write 0 End if%>;i++)
window.opener.MyForm.txtAttach.value += MultiEdit.sltAttachFile.item(i).text+"|";

window.close();
}
function DelFile()
{
selectFile = "" ;
for(var i = 0;i < MultiEdit.sltAttachFile.length;i++ )
{
if (MultiEdit.sltAttachFile[i].selected == true)
{
selectFile=MultiEdit.sltAttachFile[i].value
}
}


if ( selectFile != "" )
{
MultiEdit.action = "EditAttachFrm.asp?OperType=Del&table_id=<%=FileID%>&delete_file=" + selectFile ;
MultiEdit.submit();
}
}

//-->
</script>
</html>

jiank008 2004-12-07
  • 打赏
  • 举报
回复

<!--#Include File = ../Include/conn.asp -->

<!--#Include File = ../Include/func_Document.asp -->


<%

Response.Expires = -10000

Server.ScriptTimeOut = 300



Set theForm = Server.CreateObject("ABCUpload4.XForm")

theForm.Overwrite = True

theForm.MaxUploadSize = 800000000

theForm.ID = Request.QueryString("ID")

Set theField = theForm("fSelectFile")(1)

If theField.FileExists Then

theField.Save theField.FileName

End If

%>
<html>
<head>
<title>添加附件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../default.css" type="text/css">
<script language="JavaScript" src="../Include/bgColor.js"></script>
</head>
<% FileID= Request.QueryString("table_id")
response.write fileID
%>
<script language="javascript">

<!--

theUniqueID = (new Date()).getTime() % 1000000000;

function s() //让数据提交的同时执行显示进度条的函数

{
if (MultiEdit.fSelectFile.value == "")
{
alert("请先选择文件,再进行上传!");
document.MultiEdit.fSelectFile.focus();
}
else
{
bar(); //开始执行反映上传情况的函数

document.MultiEdit.action = "EditAttachFrm.asp?ID=" + theUniqueID; //处理上传数据的程序

document.MultiEdit.target="up" //将提交的数据放在一个名字是up隐藏的iframe里面处理,这样提交的页面就不会跳转到处理数据的页

document.MultiEdit.submit(); //提交表单

}



}

function bar()

{

bar1.style.display=''; //让显示上传进度显示的层的可见

var timeoutid=null; //这个变量是作定时器的ID

var oXMLDoc = new ActiveXObject('MSXML'); //创建'MSXML'对象

sURL = "progressbar.asp?ID=" + theUniqueID + "&temp="+Math.random(); //获取上传状态数据的地址

oXMLDoc.url = sURL; //load数据

var oRoot=oXMLDoc.root; //获取返回xml数据的根节点

if(oRoot.children != null)

{

if (oRoot.children.item(0).text-100==0) //文件上传结束就取消定时器

clearTimeout(timeoutid)

PercentDone.style.width=oRoot.children.item(0).text+"%"; //设置进度条的百分比例

//根据返回的数据在客户端显示

min.innerHTML=oRoot.children.item(1).text; //显示剩余时间(分钟)

secs.innerHTML=oRoot.children.item(2).text; //显示剩余时间(秒钟)

BytesDone.innerHTML=oRoot.children.item(3).text; //已上传数据大小

BytesTotal.innerHTML=oRoot.children.item(4).text; //总大小

BytesPerSecond.innerHTML=oRoot.children.item(5).text; //传输速率

Information.innerHTML=oRoot.children.item(6).text; //上传信息

}

if (oRoot.children.item(0).text-100<0) //只要文件没有传完,就每隔多少时间获取一次数据

timeoutid = setTimeout("bar()",50) //这里设定时间间隔是0.05秒,你也可以根据你的情况修改获取数据时间间隔

}

//-->

</script>

<script language="javascript">
<!--
function AddFile()
{
if (MultiEdit.fSelectFile.value == "")
{
alert("请先选择文件,再进行粘贴!");
document.MultiEdit.fSelectFile.focus();
}
else
{
MultiEdit.action = "EditAttachFrm.asp?OperType=Add&table_id=<%=FileID%>";
MultiEdit.submit()


}
}

function UpButtonSta()
{
window.opener.document.MyForm.btEditAttach.disabled = false;
offButton(window.opener.document.MyForm.btEditAttach);
}
function WindowClose()
{
window.opener.MyForm.txtAttach.value = "";
window.close();
//-->}

</script>
<%
Select Case Request.QueryString("OperType")
Case "Add"
Call AddAttachInSend("document" , Request.QueryString("table_id") )
Case "Del"
'先调用函数DelExistAttach()删除Files文件夹中存在的文件(此时的Session还未改变)
'Call DelExistAttach()
Call DelAttachInSend("document" , Request.QueryString("table_id") , Request.QueryString("delete_file") )
End Select
%>
<form method="POST" name="MultiEdit" Enctype="multipart/form-data" target=up>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="45" style="background-image: url('../Images/pageHeaderBG_Details.gif'); background-repeat: no-repeat; background-attachment: fixed; background-color: left; background-position: top 50%">
<tr>
<td colspan=4 align="center" class="Shadow_white_14px" nowrap><font color="#BB2F00">添
加 附 件</font></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF" height="1"></td>
</tr>
<tr>
<td bgcolor="#006CBD" height="1"></td>
</tr>
</table>
<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" bgcolor="#F0F0F0">
<br>
<table cellpadding="5">
<tr>
<td>1、点【浏览】按钮,找到您所要粘贴的附件文件:</td>
</tr>
<tr>
<td nowrap> 
<input type=file name="fSelectFile" size=35></td>
</tr>
<tr>
<td>2、选定一个文件后,点【粘贴】按钮,将该文件贴到新建公文上:
<input type="button" class="mailButton" value="上 传" name="dosubmit" onclick="s()" onMouseOver="onButton(this);" onMouseOut="offButton(this);"></td>
</tr>

<tr>
<td>
<div id=bar1 style="display:none">
<table border="0" width="100%">

<tr>

<td><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>传送:</b></font></td>

</tr>

<tr bgcolor="#999999">

<td>

<table border="0" width="" cellspacing="1" bgcolor="#0033FF" id=PercentDone>

<tr>

<td><font size=1> </font></td>

</tr>

</table>

</td>

</tr>

<tr>

<td>

<table border="0" width="100%">

<tr>

<td><font face="Verdana, Arial, Helvetica, sans-serif" size="1">剩余时间:</font></td>



28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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