init implementation for image file upload.