Muldec
asked on
Can't get request_content when request is big
Hello !
I've debeloped a LotusScript Agent handles a POST query encoded as multipart-data, in order to provide upload capabilities without using a Domino-generated form.
Inside the LotusScript code I get the POST request from the NotesSession.DocumentConte xt.GetItem Value("Req uest_conte nt")(0); this code returns a String containing the multipart message.
In order to test this agent, I made an HTML page containing a form like this:
<form method="POST" action="http://gaga/gogo.nsf/myAgent?OpenAgent" enctype="multipart/form-da ta">
<input type="file" name="gugu" />
<input type="file" name="toto" />
</form>
and I can upload files from my local computer up to the Domino server.
This work fine with small files, but my problem is that when I try to upload BIG files, let's say 200KB (shouldn't be a big deal), the "Request_content" variable is NULL!!!!
My agent :
Dim session As New NotesSession
Set doc = session.DocumentContext
'incoming is empty
incoming = doc.GetItemValue("Request_ content")( 0)
'Here, the size is right with small file, and around 576 Bytes with big files
Messagebox doc.size
Anybody to help me ?
Thanks
I've debeloped a LotusScript Agent handles a POST query encoded as multipart-data, in order to provide upload capabilities without using a Domino-generated form.
Inside the LotusScript code I get the POST request from the NotesSession.DocumentConte
In order to test this agent, I made an HTML page containing a form like this:
<form method="POST" action="http://gaga/gogo.nsf/myAgent?OpenAgent" enctype="multipart/form-da
<input type="file" name="gugu" />
<input type="file" name="toto" />
</form>
and I can upload files from my local computer up to the Domino server.
This work fine with small files, but my problem is that when I try to upload BIG files, let's say 200KB (shouldn't be a big deal), the "Request_content" variable is NULL!!!!
My agent :
Dim session As New NotesSession
Set doc = session.DocumentContext
'incoming is empty
incoming = doc.GetItemValue("Request_
'Here, the size is right with small file, and around 576 Bytes with big files
Messagebox doc.size
Anybody to help me ?
Thanks
Which version of Domino are you using?
Under R5, I'm not getting null content, but I am getting truncated contents in the 40k-60k limit range.
ASKER
qwaletee :
I'm using Domino 6.5
What are your results with files bigger than 100k ?
p_partha :
Well, I need to upload an unspecified number of files to the server. To achieve that, I've developped an ActiveX wich read files client-side and send a http-post-request multipart encoded. I need to get that request server-side to write files on the disk. My idea was to user the request_content. As I'm not a Lotus devolepper, maybe there is some other possibilities that I don't know.
I'm using Domino 6.5
What are your results with files bigger than 100k ?
p_partha :
Well, I need to upload an unspecified number of files to the server. To achieve that, I've developped an ActiveX wich read files client-side and send a http-post-request multipart encoded. I need to get that request server-side to write files on the disk. My idea was to user the request_content. As I'm not a Lotus devolepper, maybe there is some other possibilities that I don't know.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can also try other enctype values, as Domino does, but I don't think that will work particularly well.
ASKER
> Add a whole bund of file upload controls
I can't do that. The number of files that can be uploaded with my ActiveX control is illimited. So I can't create a form with a limited number of upload controls. Doing that, I could loose some files wich is not acceptable :)
I can't do that. The number of files that can be uploaded with my ActiveX control is illimited. So I can't create a form with a limited number of upload controls. Doing that, I could loose some files wich is not acceptable :)
I'm not certain you really need to have all the upload controls... one might suffice. And, even if you do need them all, thetruth is that if you put 500 in, you would be unlikely to ever have a problem.
ASKER
This is a do-it-yourself solution. But if there is no other way, I'll try it.
If there is no other answer and if it works, the points are yours.
If there is no other answer and if it works, the points are yours.
Let us know why do u need request_content information
Partha