There is a codeblock in def file_upload(self, source_filepath, domain_type, domain_identifier, custom_file_name=None, overwrite=False):
"""
# Issues with HEADERS in Request module when using non standard 'files[]' key in POST Request
# Workaround for ChurchTools - generate session with /api/whoami GET request and reuse it
# Requests module usually automatically completes required header Params e.g. Content-Type ...
# in case manual header e.g. for AUTH is used, headers don't auto complete
# and server rejects messsages or data is ommited
# Error Code 500 is also missing in API documentation
headers = {'Authorization': 'Login GEHEIM'}
response_test = requests.post(url=url, headers=headers, files=files)
#> this fails !
"""
This might be related to previous CSRF Token issues - can this be removed?
There is a codeblock in def file_upload(self, source_filepath, domain_type, domain_identifier, custom_file_name=None, overwrite=False):
This might be related to previous CSRF Token issues - can this be removed?