How to upload images from the api.