-Fixed terrible corruption problems with image upload.

#1329