edited uploadimage to include file extension