Open daemyn opened 6 years ago
same problem
make sure the header sets: res.setHeader('Content-Length', file.size); res.setHeader('Content-Type', 'application/pdf'); res.setHeader('Content-Disposition', 'attachment; filename=file.pdf')
If it still not work, you can try to update your swagger-ui version to 3.0.0+
I made an api with an endpoint that returns/download a file (application/pdf for now) But when i download the file and open it it's corrupted, however when i disable validateResponse in swaggerValidator middleware the file will be downloaded perfectly ! it seems like this middleware is altering the response Is there a way to fix this?