From 02d712614fe6c94677e5ee2d2bb868030bfcea4b Mon Sep 17 00:00:00 2001 From: markrz12 Date: Tue, 12 Dec 2023 21:28:17 +0100 Subject: [PATCH] BLUR 8 --- blurme/state.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/blurme/state.py b/blurme/state.py index 3f84851..359220d 100644 --- a/blurme/state.py +++ b/blurme/state.py @@ -24,21 +24,19 @@ class State(rx.State): # The images to show. img: list[str] = [] - async def handle_upload(self, files: list[rx.UploadFile]): """Handle the upload of file(s). - Args: files: The uploaded files. """ for file in files: upload_data = await file.read() outfile = rx.get_asset_path(file.filename) - + # Save the file. with open(outfile, "wb") as file_object: file_object.write(upload_data) - + # Update the img var. self.img.append(file.filename) self.img = self.img