You own upload will go something like this
- Post a file to the server
- Read the posted file into memory
- Create a IMediaFile instance and assign the necessary values - id, name, folder, size etc.
- Add the IMediaFile to C1
- Call MediaUrls.BuildUrl passing the IMediaFile instance from pt. 3