cancel
Showing results for 
Search instead for 
Did you mean: 

API Post - When posting a tiff the post works and when posting a PDF it fails

Brent_Keith1
Confirmed Champ
Confirmed Champ

The document Type is a Image file format in the settings within Configuration.  When using the Hyland API to post the Document a tiff is successful.  When  attempting to post a PDF it fails (Dig Console Error from APISERVER tab = Invalid file format: Unable to store PageData as FileType Image File Format).  When changing the File Format to PDF it works as it should.  

 

I then changed the file format back to a Image File format (bounced iis) the PDF was uploaded successfully-  I then tested with a tiff again and that was successful - then tried the PDF and it then failed again.

 

I can import a pdf to the document type set to image file format and it works as normal

 

When using a API to import these documents into OnBase with Keywords - should I be able to use Image File Format for both PDF and tiff?

 

1 ACCEPTED ANSWER

AdamShaneHyland
Employee
Employee

Hi @Brent Keith ,

 

The type of file you upload to associate with the Document doesn't matter.  The Document Management REST API should support all File Formats configured within OnBase.

 

You need to make sure that you include the correct fileTypeId within the POST /document request.  

 

I would review the process under the archiving documents programmers guide ...

 

https://sdk.onbase.com/rest/OnBase/Foundation23.1/document/programmers-guide/upload-archive-interact...

 

As well as the Document archive end point ...

 

https://sdk.onbase.com/rest/docs.html?product=OnBase&release=Foundation23.1&spec=document#operation/...

 

 

Take care.

View answer in original post

6 REPLIES 6

Thanks - We were missing the FileType Id so it was was using the Default File Type as it was not set within postman

Thanks for confirming @Brent Keith .  Glad you got it resolved.