Calculate the download url

def get_download_url(self, instance, default=None):
        """Calculate the download url
        """
        download = default
        # calculate the download url
        download = "{url}/@@download/{fieldname}/{filename}".format(
            url=api.get_url(instance),
            fieldname=self.get_field_name(),
            filename=self.get_filename(instance),
        )
        return download