docs: def get_attachment_data(attachmentTable, sql,
                          nameField="ATT_NAME", blobField="DATA",
                          contentTypeField="CONTENT_TYPE",
                          rel_object_field="REL_OBJECTID"):
      """ gets all the data to pass to a feature service """
      if arcpyFound == False:
          raise Exception("ArcPy is required to use this function")
      ret_rows = []
      with arcpy.da.SearchCursor(attachmentTable,
                                 [nameField,
                                  blobField,
                                  contentTypeField,
                                  rel_object_field],
                                 where_clause=sql) as rows:
          for row in rows:
              temp_f = os.environ['temp'] + os.sep + row[0]
              writer = open(temp_f,'wb')
              writer.write(row[1])
              writer.flush()
              writer.close()
              del writer
              ret_rows.append({
                  "name" : row[0],
                  "blob" : temp_f,
                  "content" : row[2],
                  "rel_oid" : row[3]
              })
              del row
      return ret_rows