@seancorfield Result is actually the same - however I've noticed that the file itself has 17 KB but the one returned by Ring has 28 KB (and at the same time LibreOffice is complaining about downloaded file being corrupted)
Hmm, we serve images via Ring's file-response
with content-type
applied to it. Are you sure none of your middleware is messing with the response? Have you tried examining the response headers either in the browser devtools or via curl -I
@petr.mensik?
These headers are being returned
{
"cache-control": "no-cache, must-revalidate, proxy-revalidate",
"content-disposition": "attachment; filename=supply.xlsx",
"content-length": "16584",
"content-type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"date": "Wed, 20 Jun 2018 15:46:59 GMT",
"last-modified": "Wed, 20 Jun 2018 15:46:59 GMT",
"server": "http-kit",
"x-content-type-options": "nosniff",
"x-frame-options": "DENY",
"x-xss-protection": "1; mode=block"
}
I'll try to disable some middleware and see if ti changes anything
Those headers look reasonable -- and the Content-Length looks close to your expected 17K.
hmm, weird, it's probably Swagger issue because I can download the file with curl
so I guess it's fine - thanks you 🙂
Cool. File downloads (and uploads) always seem to be the most problematic aspects of dealing with Ring 🙂