def make_url_args(params):

    p = []
    for key, value in params.iteritems():
        if isinstance(value, (list, tuple)):
            for v in value:
                p.append((key, v))
        elif isinstance(value, dict):
            for k, v in value.items():
                p.append(('%s[%s]' % (key, k), v))
        elif isinstance(value, bool):
            p.append((key, str(value).lower()))
        elif value is None:
            continue
        else:
            p.append((key, str(value)))
    return urllib.urlencode(p).encode("UTF-8")
Verify if file can be uploaded.
dataset/ETHPy150Open tempodb/tempodb-python/tempodb/endpoint.py/make_url_args--crossover with--dataset/ETHPy150Open syrusakbary/Flask-SuperAdmin/flask_superadmin/contrib/fileadmin.py/FileAdmin.is_file_allowed