Author Topic: How to upload a document using ODWEK?  (Read 8036 times)

pankaj.puranik

  • Sr. Member
  • ****
  • Posts: 374
    • View Profile
How to upload a document using ODWEK?
« on: February 22, 2011, 01:47:12 PM »
Hi

How could we upload a document using ODWEK?
I understand we can use storeDocument() but that requires a physical path for the file to be loaded.
I am probably looking in passing a binary stream or a byte[]. Basically a user wants to upload a document from a web application and the web application needs to use ODWEK for these ad-hoc uploads.

Cheers
Pankaj.

pankaj.puranik

  • Sr. Member
  • ****
  • Posts: 374
    • View Profile
Re: How to upload a document using ODWEK?
« Reply #1 on: February 24, 2011, 07:52:22 AM »
Ok by searching on the internet, it sems that there something called as the OnDemand Toolkit which provides you this facility along with some others. I am not sure if this would work with any CMOD platform.
I tried to download this toolbox from IBm website at http://www.redbooks.ibm.com/abstracts/tips0633.html?Open but unfortunately I get an error which says "operation timed out". This toolkit is released as open source software under the IBM Public License. If someone can download it and post it here or email me, that would be great help.

Thanks
Pankaj.

pankaj.puranik

  • Sr. Member
  • ****
  • Posts: 374
    • View Profile
Re: How to upload a document using ODWEK?
« Reply #2 on: February 24, 2011, 07:53:42 AM »
And here's the URL it redirects to ftp://www.redbooks.ibm.com/redbooks/TIPS0633/ Not sure if it is because of ftp.

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2231
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: How to upload a document using ODWEK?
« Reply #3 on: February 25, 2011, 06:15:50 AM »
If you're going to move forward with this, I have a few recommendations.

1)  Data validation.  LOTS OF IT.  CMOD is an archive, and data that is improperly indexed (typos, blank fields, etc.) is lost forever.
2)  Aggregate data (many files, one generic index file) and load with arsload.  There are many technical advantages to this approach.
3)  Don't move data to some write-once media for a few days.  Corrections are bound to happen.
4)  Try to prevent duplicates.  Nothing is more confusing than two different files with identical index criteria.  (Add a date-time field defaulted to load time!)

I'm sure there are others, but these are the ones off the top of my head.  Good luck!

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

javed.khan

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
Re: How to upload a document using ODWEK?
« Reply #4 on: March 27, 2012, 11:57:46 PM »
To add to JDs list:
When archiving with ODWEK API an important point to consider is that the archival process bypasses the normal load. Loadid as usual is not generated. Due to the above reason we cannot keep the expiration type to LOAD which is the default expiration type. It can either be document or segment.