public void Save(BinaryFile file, Stream content)
        {
            var contentF = new BinaryFileContent
            {
                BinaryFile = file,
                Content    = content.ToByteArray()
            };

            binaryFileContentRepository.Save(contentF);
        }
Exemplo n.º 2
0
 public void Save(BinaryFile file)
 {
     if (file != null && file.PostedFile != null && file.PostedFile.ContentLength > 0)
     {
         var content = new BinaryFileContent
         {
             BinaryFile = file,
             Content    = file.PostedFile.InputStream.ToByteArray()
         };
         binaryFileContentRepository.Save(content);
     }
 }