I want to update over 100 pdf files in our AGOL organizational account to keep their existing urls. The titles of the pdf items on AGOL don’t match with the pdf names that would replace the existing files. I have a csv file that stores all the AGOL file names and the local paths to files that would replace those items. What could be the best solution to achieve this? Thank you!
df = {“agol_title”: [‘item1’, ‘item2’, ‘item3’], ‘type’: [‘PDF’, ‘PDF’, ‘PDF’], ‘agol_ids’: [‘a123’, ‘b123’, ‘c123’], ‘local_path’: [‘C://username/un/file1.pdf’, ‘C://username/un/file2.pdf’, ‘C://username/un/file3.pdf’]}
from arcgis.gis import GIS
gis = GIS(url = '', 'username', 'password')
for index, row in df.iterrows():
item.update(item_properties=df[‘title’,’type’],overwrite=True, data=df[‘local_path’])