Fix creation of invalid authorization headers.
Add UploadedImage type and use it where appropriate.