Skip to main content
Participant
August 7, 2023
Question

Express API response with a json string or byte array instead of having the file to be saved

  • August 7, 2023
  • 1 reply
  • 676 views

PDF Exctract API in .NET has option to save the output json file and excel using result.SaveAs but is there a way to get the response to just be byte array or json object or json string insteadt of saving it in a local directory.

This topic has been closed for replies.

1 reply

Joel Geraci
Community Expert
Community Expert
August 7, 2023

With the current SDKs a temporary file is always saved. With the FileRef object, tou can either save it to a new file or save it to an outputstream. It you want to work with the response in memory and just get the relevant files from the returned ZIP, you'll need to call the API via REST directly. It's pretty easy to do in NodeJS and Java. I suspect it's not too different using .NET and I'd give you a code sample but I haven't used ,NET in decades.