'* if save_as is False the header will not be added
* if save_as is a filename, it will be used in the header
* if save_as is True or None the filename will be determined from the
file path'

def save_as_header(self, response, **kwargs):

    save_as = kwargs.get(u'save_as', None)
    if (save_as is False):
        return
    file_obj = kwargs.get(u'file_obj', None)
    if ((save_as is True) or (save_as is None)):
        filename = os.path.basename(file_obj.path)
    else:
        filename = save_as
    response[u'Content-Disposition'] = smart_str((u'attachment;    filename=%s' % filename))
