make sure file downloads work correctly with elasticsearch