Skip to content

Commit 1523c22

Browse files
author
Ace Nassri
authored
GCF: add multipart file-persistence note (#3429)
* Update main.py Given that we added this note in the Java sample, I thought it was worth adding here. * Update main.py
1 parent 1e072f2 commit 1523c22

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

functions/http/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ def parse_multipart(request):
8585
# This code will process each file uploaded
8686
files = request.files.to_dict()
8787
for file_name, file in files.items():
88+
# Note: GCF may not keep files saved locally between invocations.
89+
# If you want to preserve the uploaded files, you should save them
90+
# to another location (such as a Cloud Storage bucket).
8891
file.save(get_file_path(file_name))
8992
print('Processed file: %s' % file_name)
9093

0 commit comments

Comments
 (0)