File Upload And Download
Users can upload and download files on the web using Simplex. This is useful for uploading images to pages like real estate listings or for downloading files from medical records or EHR systems.
Uploading Files
To upload files, we provide the click_and_upload endpoint and SDK function, which takes in an element description and a file to upload. The element description must be an element that would typically open the operating system file upload dialog.
In this example, we have to run click_and_upload with the “Click or drag and drop” section and our desired file. We’re using a file called “logo.png” here.
Downloading Files
To download files, we provide the click_and_download endpoint and SDK function, which takes in an element description. The element description must be an element that would typically download a file to your computer.
In this (slightly contrived) example, we have to first press the “Select Action” button, then run click_and_download with the “Download Logo” button.
You should now see a logo-{timestamp}.png
file in the directory you ran the script from.
Was this page helpful?