Am trying to implement an API automation process to identify empty/0 bytes folders so I can delete them, similar to what was asked here.
I can't find 'size' attribute for folders in my requests response, my code is:-
import requests
import json
url = "https://api.dropboxapi.com/2/files/list_folder"
headers = {
"Authorization": "Bearer <access-token>",
"Content-Type": "application/json"
}
data = {
"path": "/Cat Watching Test",
"recursive": True
}
r = requests.post(url, headers=headers, data=json.dumps(data))
How do I calculate the size of folders from the API?
