Make file uploading work on the container aspect.

Also factor file uploading and some of the dragdrop code out into utilties.

Change-Id: I083ff9e49311ec02c66bcae06ec27b491b6037d6