Hello, I'm trying to use the item.get_data() method in a backup tool, to download all files from my content. However, when I call this method and the item.type is PDF, instead giving me the local path where the PDF should be stored, it gives me somthig like this:
b'PK\x03\x04\x14\x00\x06\x00\x08\x00\x00\x00!\x00\xa0\x82\x90\x90\xc5\x01\x00\x00\xe2\x08\x00\x00\x13\x00\x08\x02[Content_Types].xml \xa2\x04\x02(\xa0\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0 ....'
Is this the normal behaviour? When calling this method with CSV, KML, etc it works as I expected. The whole code I'm using is here: GISBox/ArcGISBackup.py at BackupTool · aitorcalero/GISBox · GitHub
Part of the problem could be that I use this:
path = str(item.get_data())
to convert it to a string. However, if it's that the case, how do I get the path to the dowloaded PDF? The item.get_data() method when used in a PDF seems to be returning a {byte} array.