Beispiel #1
0
def download_resource_by_name(name):
    resource = ModelResource.query.filter_by(resource_name=name).first()
    if resource:
        obj = storage.get(resource.resource_name)
        download_url = obj.download_url()
        return redirect(download_url, code=302)
Beispiel #2
0
def download_resource_by_name(name):
    resource = ModelResource.query.filter_by(resource_name=name).first()
    if resource:
        obj = storage.get(resource.resource_name)
        download_url = obj.download_url()
        return redirect(download_url, code=302)
Beispiel #3
0
def download_resource(id):
    resource = ModelResource.query.get(id)
    if resource:
        obj = storage.get(resource.resource_name)
        download_url = obj.download_url()
        return redirect(download_url, code=302)
Beispiel #4
0
def download_resource(id):
    resource = ModelResource.query.get(id)
    if resource:
      obj = storage.get(resource.resource_name)
      download_url = obj.download_url()
      return redirect(download_url, code=302)