fix bug when upload image with empty name