During a file upload, we need to send the right initial page text to the upload API to populate the license, comment, copystatus and source correctly. On Mediawiki side, we use this function https://github.com/wikimedia/mediawiki/blob/master/includes/specials/SpecialUpload.php#L616-662 to create this text.
We need to have an equivalent of this function in our upload script to generate the right text string. The function should go into https://github.com/tonythomas01/gdrive-to-commons/blob/master/uploader/wiki_uploader.py file and should be of the following form:
def get_initial_page_text(license='', summary='')
"""
Should return something similar to:
== Summary ==
Summary goes here.
== Licensing ==
{{PD-old-70|Unclear-PD-US-old-70}}
"""
returnLater, we need to make it support copyrighted files, but that is a different task.