本文介绍了从DCRM 2011将压缩的图像上载到Sharepoint服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何压缩图像,然后将图像从我的DCRM 2011上传到SharePoint Server.

谢谢,

Vishal

How to compress and then upload an image from my DCRM 2011 to SharePoint Server.

Thanks,

Vishal

推荐答案

public static void Compress(FileInfo fi)
{
    using (FileStream inFile = fi.OpenRead())
    {
        if ((File.GetAttributes(fi.FullName)
            & FileAttributes.Hidden)
            != FileAttributes.Hidden & fi.Extension != ".gz")
        {
            using (FileStream outFile =
                        File.Create(fi.FullName + ".gz"))
            {
                using (GZipStream Compress =
                    new GZipStream(outFile,
                    CompressionMode.Compress))
                {
                inFile.CopyTo(Compress);
                }
            }
        }
    }


这篇关于从DCRM 2011将压缩的图像上载到Sharepoint服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 15:47