Beispiel #1
0
def sample_get_file_url(filename):
    user = api.current_user()
    if user:
        oid = api.oid_by_name(user, filename)
        if oid:
            return api.url_for(user, oid)
    return ''
Beispiel #2
0
def sample_get_file_url(filename):
    user = api.current_user()
    if user:
        oid = api.oid_by_name(user, filename)
        if oid:
            return api.url_for(user, oid)
    return ''
Beispiel #3
0
def get_id_by_filename(key, filename):
    user = api.user_by_key(key)
    if not user:
        abort(404)
    oid = api.oid_by_name(user, filename)
    if oid:
        return oid
    abort(404)
Beispiel #4
0
def get_id_by_filename(key, filename):
    user = api.user_by_key(key)
    if not user:
        abort(404)
    oid = api.oid_by_name(user, filename)
    if oid:
        return oid
    abort(404)