document - handle image upload