Refactored download url creation
Encapasulated this behavior in Endpoint class,changing the download url creation in the file service to endpoint.rewriteUrl(url) and added a new method to the Endpoint class to handle this.