You are viewing limited content. For full access, please sign in.

Question

Question

Using Laserfiche Cloud Web Services to Post a File to a third-party REST API

asked on December 14, 2021

Does anyone have an example on how to leverage the Cloud Web Services integration to post a file (usually a PDF but sometimes a JPG) to a third-party REST API?  I believe I know how to handle the REST API side but I don't see how to "send" the file to the Web Services integration as the payload.  

I would expect the payload to be something like this:

 

{

"filename" : "pdftotransfer.pdf",

"filedata" : ""

}

 

Where the filedata would be some sort of byte representation of the file.  That's the part I cannot determine how to accomplish.

The alternative would be to send the REST API a full URL of the file in the Laserfiche repo but then I would have to deal with authentication somehow but if there are examples of that this would be acceptable as a second choice. 

 

Thank you,

David Finkelstein

1 0

Replies

replied on June 7, 2022

Ended up having to send the Entry ID and then PULL the file from the Laserfiche API.  It's a bit annoying because it uses up API calls but at the moment I think the limitations will work out for this scenario.  In other scenarios, I'd really rather PUSH the file so I am still looking for the correct solution.

0 0
replied on January 17, 2023

David, could you please explain in detail how you were able to achieve this? Thanks.

0 0
replied on January 18, 2023
0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.