I am using api cloud storage with google engine to create a list of folders in a bucket in google cloud storage. I am going to create this list on an HTML page.
I call this bucket yyyfor an example. Here is my code base.
from flask import render_template
from flask import Blueprint, redirect, request, abort
from google.appengine.api import users
from thirdpartylib import cloudstorage
admin_routes = Blueprint('admin_routes', __name__)
@admin_routes.before_request
@admin_routes.route('/xxxxx')
def admin_home():
if not users.is_current_user_admin():
return redirect(users.create_login_url(request.url))
files = cloudstorage.listbucket('/yyy', delimiter='/')
paths = [os_path for os_path in files]
return render_template('/df/rain.html', paths=paths)
The problem I am facing is that the file object is empty when I run dev_appserver.py.
I know that cloud storage has a specific sequence. But I created a bucket, and all its contents were loaded three days ago. Each item has a public URL.
I can’t understand why I don’t see the result JSON.
source
share