attempt to fix image upload

first steps. refs #566 
This appears to partially fix the issue - currently, trying to upload an image does generate a commit (which previously didn't happen). However, the commit doesn't actually include the image.
it's not clear to me whether the variable shadowing (`e`) is intended. anyone know what the `e` argument does here?