Skip to content

Instantly share code, notes, and snippets.

View jasminegrewal's full-sized avatar

Jasmine jasminegrewal

View GitHub Profile
@merqurio
merqurio / example.py
Created October 14, 2014 08:43
Flask image file upload with Google App Engine (GAE) Blobstore Example, with Google Cloud Storage (GCS)
# Render the template for the upload form:
@app.route("/upload")
def upload():
uploadUri = blobstore.create_upload_url('/submit', gs_bucket_name=BUCKET_NAME)
return render_template('upload.html', uploadUri=uploadUri)
# Place your uploadUri in the form path (html):
'''<form action="{{ uploadUri }}" method="POST" enctype="multipart/form-data">'''