From adc2d060943effd0548c18f32c8b3771cba59ff6 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sat, 13 Mar 2021 22:08:23 +0200 Subject: [PATCH] main.py: Add note about using /tmp I originally wanted to use an "uploads" directory or something, but it seems we can only write to /tmp on Google App Engine. They really want you to buy storage or database services! This is memory mapped so it disappears when you re-deploy. --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 4301109..ff6f38c 100644 --- a/main.py +++ b/main.py @@ -18,6 +18,8 @@ from werkzeug.utils import secure_filename app = Flask(__name__) app.config["MAX_CONTENT_LENGTH"] = 1024 * 1024 app.config["UPLOAD_EXTENSIONS"] = [".csv"] +# the only place we can write to on Google App Engine is /tmp +# see: https://cloud.google.com/appengine/docs/standard/python3/using-temp-files app.config["UPLOAD_PATH"] = "/tmp"