def uploadf(self, file: str, key: str, **_kwargs):
"""
1. for each sub-folder in the path check if exists or create
2. upload file to root_id/other_paths.../filename
"""
# doesn't work if key starts with / which can happen from telethon todo fix
if key.startswith('/'):
# remove first character ie /
key = key[1:]
In telethon if there are subdirectories wanting creating, sometimes a key is passed with a leading
/
character which confuses the join.I've worked around it by adding a catch, but need to clean up
https://github.com/bellingcat/auto-archiver/blob/main/storages/gd_storage.py
A example is: https://t.me/witnessdaily/169265