2.2.3. DownloadFile
Implement this function:
- User.download_file(filename: str) bytes
Downloads the contents of the latest version of the file named
filenamethat is owned by the calling user, and returns its contents. However, raises autil.DropboxErrorin the following circumstances:If no file named
filenameexists.The integrity of the file cannot be verified (i.e. due to malicious action).
File retrieval cannot complete due to malicious action.
- Parameters:
filename (str) – The name of the file
- Returns:
The file data
- Return type:
bytes
- Raises:
DropboxError – if an error case occurred