This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



May 7, 2012, 7:04 AM
26 Posts

Extracting the attachment from xPage

  • Category: Other
  • Platform: Linux
  • Release: 8.5.2
  • Role: Developer
  • Tags: xPage
  • Replies: 1
 Hi,
 
I have an xPage which has a file upload  control. Once the user selects any file to upload, I want to save the uploaded file to an external RDBMS without saving the same in any domino document.
 
 
I was not able to understand it fully. Can anyone share some light on it or guide me to some other direction?
 
Thanks  
Yusuf Afini 
May 7, 2012, 12:17 PM
261 Posts
Re: Extracting the attachment from xPage
Hello Yusuf,
 
My blog post was written to clarify how you can get a handle on a file that was uploaded to an XPage using a HTTP POST, not by using an upload control on an XPage.
 
For what you're trying to do you could bind the XPage to a Document datasource and the upload to a rich text field in that document. When processing the uploaded file (in the querySaveDocument event for example) you can then retrieve it from the rich text field using the getAttachment() method of the EmbeddedObject class and do with it what you want.
 
An alternative would be to create a managed bean and bind the upload control to a bean property. See here for a tip on what to bind it to.
 
Mark
 
 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal