新しいBoxサポートサイトへようこそ。 変更点の詳細はこちらをご確認ください .

How to download a file from box folder using filename and not by file id in python ?

新規投稿

コメント

2件のコメント

  • Alex Novotny

    Hi!

    This feature doesn't currently exist in the API right now. It is on the team's radar though. 

    Alex, Box Developer Advocate

    0
    コメントアクション Permalink
  • Alex Novotny

    You could do something like this... where you iterate of the items in a folder... but it's kinda a hacky way to do it. 

    def get_item_id_by_name_in_folder(folder: Folder, item_name: str):
        for item in folder.get_items():
            if item.name == item_name:
                return item.id
        raise Exception(f"No item found with name {item_name}")
    0
    コメントアクション Permalink

投稿コメントは受け付けていません。