ring

petr.mensik 2018-06-20T15:39:57.000070Z

@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)

seancorfield 2018-06-20T15:45:06.000417Z

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?

petr.mensik 2018-06-20T15:48:22.000084Z

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"
}

petr.mensik 2018-06-20T15:48:47.000229Z

I'll try to disable some middleware and see if ti changes anything

seancorfield 2018-06-20T15:51:28.000705Z

Those headers look reasonable -- and the Content-Length looks close to your expected 17K.

petr.mensik 2018-06-20T15:56:40.000261Z

hmm, weird, it's probably Swagger issue because I can download the file with curl

petr.mensik 2018-06-20T15:56:47.000017Z

so I guess it's fine - thanks you 🙂

seancorfield 2018-06-20T15:57:22.000779Z

Cool. File downloads (and uploads) always seem to be the most problematic aspects of dealing with Ring 🙂