Skip to content
Snippets Groups Projects
Verified Commit 35dc23d1 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Add handle_uploaded_file handler

parent 4c482879
No related branches found
No related tags found
1 merge request!304Add universally usable progress bar for Celery tasks
Pipeline #2633 passed
......@@ -343,3 +343,9 @@ def objectgetter_optional(
return eval(default) if default_eval else default # noqa:S307
return get_object
def handle_uploaded_file(f, filename: str):
with open(filename, "wb+") as destination:
for chunk in f.chunks():
destination.write(chunk)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment