Make common module for file uploading.

Closes #16