implement temporary file cleanup

This commit is contained in:
Jakob Ketterl
2021-02-10 22:24:43 +01:00
parent 7097dc1cd8
commit 1e72485425
2 changed files with 6 additions and 3 deletions

View File

@@ -30,7 +30,6 @@ class ImageUploadController(AuthorizationMixin, AssetsController):
# TODO: limit file size
# TODO: check image mime type, if possible
contents = self.get_body()
# TODO: clean up files after timeout or on shutdown
with open(self.getFilePath(), 'wb') as f:
f.write(contents)
self.send_response(json.dumps({"uuid": self.uuid}), content_type="application/json")