Upload Image using Code

Okay thanks, should the field type in the collection be set to “URL” or Document?