I want to upload a file to path like `documents/book_name.sdr/LanguageLayer.en.asin.kll` and I'm using this code:
Code:
def upload_file_to_kindle_mtp(driver: Any, source_path: Path, dest_path: Path) -> None:
storage = driver.filesystem_cache.storage(driver._main_id)
parent = driver.ensure_parent(storage, dest_path.parts)
with source_path.open("rb") as f:
driver.put_file(parent, dest_path.parts[-1], f, source_path.stat().st_size)
source_path.unlink()
the code works on Android device but can't upload files to scribe. Could someone point out why my code doesn't work?
Original code on GitHub:
https://github.com/xxyzz/WordDumb/bl...e.py#L276-L284