Download_image function
This commit is contained in:
parent
e1d147f6dc
commit
8e319bc4bb
@ -33,7 +33,7 @@ def settings() -> rx.Component:
|
||||
rx.button("Anonimizuj",
|
||||
width = "125px"),
|
||||
rx.button("Pobierz",
|
||||
#on_click=lambda img_name=img: State.download_image(img_name),
|
||||
on_click=lambda img_name=img: State.download_image(img_name),
|
||||
width = "125px"),
|
||||
padding="1em"
|
||||
),
|
||||
|
@ -32,8 +32,11 @@ class State(rx.State):
|
||||
if img_name in self.img:
|
||||
self.img.remove(img_name)
|
||||
self.img=self.img
|
||||
def download_image(img_name: str):
|
||||
return rx.download(url=f'/{img_name}', filename=img_name)
|
||||
def download_image(self, img_name):
|
||||
print(self.img)
|
||||
return rx.download(url=f'/{img_name}', filename=img_name)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user