You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have case where I upload file to server, do edits in copy of the file and provide edited copy of the file to the user, who downloads the file to his machine. I'm able to delete the original file from the server when the copy is created, but how can I delete the file from server after user clicks download button? There is no action on ui.link() or ui.button() when parameter path is set
q.page["downloadcard"] =ui.form_card(
box="1 10 -1 1",
items=[
ui.button(name="download_butotn", label="Download File",primary=True,path=q.client.download_link[0]),
ui.link(name="download_link", label="Download File",button=True,path=q.client.download_link[0])
]
)
if q.args.download:
#does not work
await q.site.unload(q.client.download_link[0])
os.remove(q.client.file_name_modified)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have case where I upload file to server, do edits in copy of the file and provide edited copy of the file to the user, who downloads the file to his machine. I'm able to delete the original file from the server when the copy is created, but how can I delete the file from server after user clicks download button? There is no action on ui.link() or ui.button() when parameter path is set
Beta Was this translation helpful? Give feedback.
All reactions