I have a query that returns an image representing an uploaded file (specifically, it's this Onfido endpoint). When I run it, I get an empty "Response" back:
The "API Request" tab has the following details:
{
"request": {
"url": "https://api.eu.onfido.com/v3.2/documents/dcdfe054-a9af-44f0-8453-cdba9ae18b29/download",
"credentials": "same-origin",
"headers": {
"Authorization": "---sanitized---"
},
"method": "GET"
},
"response": {
"headers": {
"cache-control": "private",
"connection": "close",
"content-disposition": "attachment; filename=\"dcdfe054-a9af-44f0-8453-cdba9ae18b29.jpeg\"",
"content-length": "240990",
"content-transfer-encoding": "binary",
"content-type": "image/jpeg",
"date": [
"Wed",
"08 Jun 2022 08:29:04 GMT"
],
"etag": "W/\"c7f454fcd21d9dc48b12a6c41ec3b733\"",
"via": "1.1 d8d9c12d1a621129f4bc739038e7c72e.cloudfront.net (CloudFront)",
"x-amz-apigw-id": "TZOYiGJRDoEFU1w=",
"x-amz-cf-id": "nBfiDjTjUOmGnvEu8ogINhirvuTgYM-DFHu-YYJFEnPzCxEgSJdNYA==",
"x-amz-cf-pop": "SEA73-P2",
"x-amzn-remapped-connection": "keep-alive",
"x-amzn-remapped-date": [
"Wed",
"08 Jun 2022 08:29:04 GMT"
],
"x-amzn-requestid": "8fdf739b-3385-4117-acaa-9488da135e1a",
"x-amzn-trace-id": "Root=1-62a05dd0-6153e1a00ecfda607a9da974",
"x-cache": "Miss from cloudfront",
"x-content-type-options": "nosniff",
"x-frame-options": "SAMEORIGIN",
"x-request-id": "84c5a554-c514-439a-839d-54de30a4ba08",
"x-runtime": "0.080741",
"x-runtime-r": "4",
"x-xss-protection": "1; mode=block"
},
"status": 200,
"statusText": "OK",
"ok": true,
"url": "https://api.eu.onfido.com/v3.2/documents/dcdfe054-a9af-44f0-8453-cdba9ae18b29/download"
}
}
How do I display this document inside an image component when I can't access the raw response?