?
Solved

Can't get request_content when request is big

Posted on 2003-12-05
9
Medium Priority
?
1,696 Views
Last Modified: 2013-12-18
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.DocumentContext.GetItemValue("Request_content")(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-data">
<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
0
Comment
Question by:Muldec
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 14

Expert Comment

by:p_partha
ID: 9885321
If you can tell what are you trying to achieve by printing request_content , we can help you out with alternatives, I tried attaching more than 576 bytes file , i cud succesfully print the value of request_content.

Let us know why do u need request_content information


Partha
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9892735
Which version of Domino are you using?
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9892867
Under R5, I'm not getting null content, but I am getting truncated contents in the 40k-60k limit range.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Muldec
ID: 9895066
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.
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 750 total points
ID: 9895105
Do it the same way Notes would normally do it.  Create a form to post to.  Add a whole bund of file upload controls.  Use a QuerySave Agent to process the incoming document and its attachments.  WHat you will want to do is a loop similar to:

Dim s as new notesSession
Dim doc as notesDocument
Set doc = sdocumentConetxt
Dim fileNames
fileName = Evaluate("@AttachmentNames".doc)
Dim obj as notesEmbeddedObject
Forall fileName in fileNames
  Set obj = doc.getAttachment(fileName)
  obj.extractFile "C:\TEMP\" & fileName
End Forall
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9895117
You can also try other enctype values, as Domino does, but I don't think that will work particularly well.
0
 

Author Comment

by:Muldec
ID: 9895174
> 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 :)
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9895181
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.
0
 

Author Comment

by:Muldec
ID: 9895267
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.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month12 days, 7 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question