Image upload

In progress. Code close to working.