implement uploading of top panorama, too

This commit is contained in:
Jakob Ketterl
2021-02-09 00:12:53 +01:00
parent ad5daaae95
commit 3b670016be
6 changed files with 80 additions and 51 deletions

View File

@@ -28,7 +28,9 @@ class ImageUploadController(AssetsController):
def processImage(self):
self.uuid = uuid.uuid4().hex
# 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")