fix(media): define schema for media urls

should use https urls when configured
Upload file using an external URL(needed for SD-357). User avatar works as well.