def get_url(field):
    """Return file's url based on base url set in settings."""
    hydrated_path = _get_hydrated_path(field)
    base_url = getattr(settings, 'RESOLWE_HOST_URL', 'localhost')
    return "{}/data/{}/{}".format(base_url, hydrated_path.data_id, hydrated_path.file_name)