public static UserImageModel CreateFileUrls(int id, string ext = ImageSuportedFormats.Jpg, int time = 0)
 {
     if (time == 0)
     {
         time = UnixTime.UtcNow();
     }
     return(UserImageHelper.CreateFileUrls(AzureCdnType.UserCdn, id,
                                           UserImageHelper.CreateFileNames(time, ext)));
 }
        public static string CreateFileUrl(int channelId, string ext = ImageSuportedFormats.Jpg, int time = 0)
        {
            if (time == 0)
            {
                time = UnixTime.UtcNow();
            }
            var fileName = UserImageHelper.CreateFileName(UserImageProperty.Icon, time, ext);

            return(UserImageHelper.CreateFileUrl(UserImageCdnData.ChannelCdn, channelId, fileName));
        }
        public static async Task <string> CreateFromB64Async(string sourceBase64, int channelId, string ext = ImageSuportedFormats.Jpg, int time = 0, int iconSize = IconSize)
        {
            if (ext != ImageSuportedFormats.Jpg || ext != ImageSuportedFormats.Png)
            {
                ext = ImageSuportedFormats.Jpg;
            }

            var url = CreateFileUrl(channelId, ext, time);
            var cf  = new UserImageLoader();
            await cf.CreateFromB64Async(sourceBase64, url, iconSize, UserImageHelper.GetFormat(ext));

            return(url);
        }
        public static async Task <UserImageModel> CreateFromB64Async(string sourceBase64, int id, string ext = ImageSuportedFormats.Jpg, int time = 0)
        {
            if (ext != ImageSuportedFormats.Jpg || ext != ImageSuportedFormats.Png)
            {
                ext = ImageSuportedFormats.Jpg;
            }

            var urls = CreateFileUrls(id, ext, time);

            await CreateFromB64Async(sourceBase64, urls, UserImageHelper.GetFormat(ext));

            return(urls);
        }
 public static UserImageModel GetFileUrls(string dbImages)
 {
     return(UserImageHelper.GetFileUrls(DefaultUrls, dbImages));
 }