UploadBlob.cs

21 lines | 468 B Blame History Raw Download
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model.ViewModel.Files
{
    public class UploadBlob
    {
        public int ID { set; get; }
        public string Data { set; get; }

        public byte[] ToByte()
        {
            var base64 = Data.Substring(@"data:application/octet-stream;base64,".Length);
            return Convert.FromBase64String(base64);
        }
    }
}