full implementation of specification, caveat: image not being resized on upload