'Get the shp or geotiff file for this layer.'

def get_base_file(self):

    if (self.upload_session is None):
        return (None, None)
    base_exts = [x.replace('.', '') for x in (cov_exts + vec_exts)]
    base_files = self.upload_session.layerfile_set.filter(name__in=base_exts)
    base_files_count = base_files.count()
    if (base_files_count == 0):
        return (None, None)
    msg = ('There    should    only    be    one    main    file    (.shp    or    .geotiff    or    .asc),    found    %s' % base_files_count)
    assert (base_files_count == 1), msg
    list_col = None
    if (self.storeType == 'dataStore'):
        (valid_shp, wrong_column_name, list_col) = check_shp_columnnames(self)
        if wrong_column_name:
            msg = ('Shapefile    has    an    invalid    column    name:    %s' % wrong_column_name)
        else:
            msg = _('File    cannot    be    opened,    maybe    check    the    encoding')
        assert valid_shp, msg
    return (base_files.get(), list_col)
