test upload image with common api.