Upload file via ftp

I would like to upload a file via ftp so I can use the result of the Python code elsewhere. In my case, the Python (via AnacondaCode) would generate a video (.mp4 or .gif) and if it is on an URL, I can play it later.
However, ftplib is not supported (yet) on pyoide, so that won’t work. Any other possibility?

Anaconda Code runs in an embedded browser, so it can make network requests. Instead of ftplib, you will need to use something like HTTP POST to send your data.

In the Environment tab, add the requests library and Save Changes.

Then you can use requests to POST the data to a URL.

import requests

requests.post('https://some.url/path/to/endpoint', data=...)