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);
        }
Exemplo n.º 2
0
        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);
        }