diff --git a/pocketbase/client.py b/pocketbase/client.py index 1aa8d32..5901dcf 100644 --- a/pocketbase/client.py +++ b/pocketbase/client.py @@ -133,6 +133,10 @@ def get_file_url(self, record: Record, filename: str, query_params: dict): result += params return result + def get_file_token(self): + res = self.send("/api/files/token", req_config={"method": "POST"}) + return res["token"] + def build_url(self, path: str) -> str: url = self.base_url if not self.base_url.endswith("/"):