How to send image files from server to client? #6087
Unanswered
hexdecimal16
asked this question in
Q&A
Replies: 1 comment
-
My personal inclination is to serve them over something other than a GraphQL request. One common way is to store the images on something like AWS S3 or GCP, and have a GraphQL request return a time-limited signed URL to the S3 file. Or if you want to serve from local disk, having a GraphQL request that returns an URL with some sort of authentication, and then whatever your web framework's standard way of serving static files is. Leaving static file serving to code that is optimized around it (and does all the appropriate caching/Range/etc HTTP headers) seems like the way to go in my experience. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have setup graphql-upload to send files from client to server is there a way to send back files from server to client.
Beta Was this translation helpful? Give feedback.
All reactions