Fixed file download in API server