Skip to content

Middleware for requesting a PDF file in a get request #1355

Answered by iMacTia
bradbergeron-us asked this question in Help
Discussion options

You must be logged in to vote

Hey @bradbergeron-us, sorry for the late reply, the last few days have been really busy with the Faraday v2 release!

I'm glad to hear you're now able to complete the request and you're getting the binary data as expected.
However I'm afraid that's pretty much as far as Faraday can help you with.
Now that you got the information you need, it's up to you to decide what to do with it.

There are several options available, below are some:

  • Store the binary data into the DB for persistent storage
  • Store the binary data into a temporary file accessible from the outside and return the URL to it
  • Return the raw data to the front end

If you don't need to reference this file in future, then the last …

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
3 replies
@bradbergeron-us
Comment options

@olleolleolle
Comment options

@olleolleolle
Comment options

Comment options

You must be logged in to vote
5 replies
@bradbergeron-us
Comment options

@iMacTia
Comment options

@bradbergeron-us
Comment options

@iMacTia
Comment options

@bradbergeron-us
Comment options

Comment options

You must be logged in to vote
2 replies
@iMacTia
Comment options

@bradbergeron-us
Comment options

Answer selected by iMacTia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants