Getting Started
File Upload and Download
Users can upload files on the web using Simplex.
Uploading Files
To upload files, we provide the click_and_upload function, which takes in an element description and a file to upload. The element description must be an element that would normally open the operating system file upload dialog.
We’re using a file called “logo.png” in this example.
upload_file.py
Downloading Files
To download files, we provide the click_and_download function, which takes in an element description. The element description must be an element that starts a file download.
We return the filename and the bytes of the file so you can either write it to disk or pass it to a cloud storage (S3, GCS, etc).
download_file.py