Can you reconcile the upload_file method in common.py with this one and have a single implementation?