通过经典ASP形式发布大文本 [英] Posting large text via classic-ASP form

查看:134
本文介绍了通过经典ASP形式发布大文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于无法获得下面的文本框值,我收到错误:



I gets an error due to can't get the value of textbox below:

ADODB.Stream error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.





我的HTML代码





My HTML Codes

<form method="POST" action="?X=1" id="myForm">
    <input type="text" name="img_val" id="img_val" value="" />
    <input type="submit" value="Submit Largest Code" />
</form>





我的ASP代码:





My ASP Codes:

<%

IF LEN(Request("X"))>0 THEN

base64String = Trim(Request.Form("img_val"))
Set tmpDoc = Server.CreateObject("MSXML2.DomDocument")
Set nodeB64 = tmpDoc.CreateElement("b64")
nodeB64.DataType = "bin.base64"
nodeB64.Text = Mid(base64String, InStr(base64String, ",") + 1)
set bStream = server.CreateObject("ADODB.stream")
bStream.type = 1
call bStream.Open()
call bStream.Write(nodeB64.NodeTypedValue)
caminho=Server.MapPath("/SS/imagem.png")
call bStream.SaveToFile(caminho, 2)
call bStream.close()
set bStream = nothing

END IF
%>





我尝试在下面发布的示例Base64代码:





Sample Base64 code that I trying to post below:

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAQFCAYAAABQN9UwAAAAAXNSR0IArs4c6QAA





我的尝试:



大家好,



我正在尝试发布base64代码保存为图像,但是当我尝试提交base64代码时,我无法发布文本框的值。



是否有限制通过发布表单发送给代码?



What I have tried:

Hi All,

I'm trying post base64 code to save as an image but I can't post the value of textbox when I try submit my base64 code.

Is there limit send to codes via posting form?

推荐答案

最大POST大小取决于Web服务器和Web浏览器。我有一种感觉,你的帖子上的Base64样本是部分的,可能很大。由于这是在ASP classic下发布的,请检查您的Web服务器的
The maximum POST size depends on web server and web browser. I have a feeling that the the Base64 sample on your post is partial and probably large. Since this is post under ASP classic, check
AspMaxRequestEntityAllowed

设置。这应该给你一些想法。

setting of your web server. That should give you some ideas.


这篇关于通过经典ASP形式发布大文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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