I'm using an express server to proxy a file to download from amazon s3. How do I either preserve the filename in the header or set the filename info in the headers so that when a user downloads the filename it doesn't just say s3.jpeg but instead correctly says test.jpg?
app.get("/s3", function(req, res) {
var client;
client = require('pkgcloud').storage.createClient({
provider: "amazon",
key: "test",
keyId: "test"
});
return client.download({
container: 'test',
remote: 'test.jpg'
}).pipe(res);
});