• 大小: 16.73MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-30
  • 语言: 其他
  • 标签: 文档管理  

资源简介

实用的在线文档管理系统,可以实现增删改查、目录维护,剪切等功能

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Web;

public static class DownloadFile
{
    public static void ResponseFile(string path HttpContext contextbool hasfileName)
    {
        context = HttpContext.Current;
        //+5+1+a+s+p+x
        System.IO.Stream iStream = null;
        byte[] buffer = new Byte[10000];
        int length;
        long dataToRead;
        string filename;
        if (!hasfileName)
        {
            filename = System.IO.Path.GetFileName(path);
        }
        else
        {
            filename = “down_“ + DateTime.Now.ToString(“yyyyMMddHHmmss“)+“.zip“;
        }

        try
        {
            iStream = new System.IO.FileStream(path System.IO.FileMode.Open System.IO.FileAccess.Read System.IO.FileShare.Read);
            dataToRead = iStream.Length;
            context.Response.ContentType = “application/octet-stream“;
            context.Response.AddHeader(“Content-Disposition“ “attachment; filename=“ + HttpUtility.UrlEncode(filename System.Text.Encoding.UTF8));

            while (dataToRead > 0)
            {
                if (context.Response.IsClientConnected)
                {
                    length = iStream.Read(buffer 0 10000);
                    context.Response.OutputStream.Write(buffer 0 length);
                    context.Response.Flush();

                    buffer = new Byte[10000];
                    dataToRead = dataToRead - length;
                }
                else
                {
                    dataToRead = -1;
                }
            }
        }
        catch (Exception ex)
        {
            context.Response.Write(ex.Message);
        }
        finally
        {
            if (iStream != null)
            {
                iStream.Close();
            }
        }
    }


}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      85958  2017-06-27 14:45  在线文档管理系统\.vs\config\applicationhost.config

    ..A..H.     39424  2017-06-27 15:59  在线文档管理系统\.vs\WebFilesExplorer\v14\.suo

     文件       1386  2012-08-21 09:23  在线文档管理系统\Backup\css\WebExplorer.css

     文件       1886  2012-08-21 09:23  在线文档管理系统\Backup\DownLoadFile.cs

     文件        236  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\behaviors\disablehandles.htc

     文件        822  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\behaviors\showtableborders.htc

     文件       2648  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\fck_editorarea.css

     文件       4145  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\fck_internal.css

     文件       1696  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\fck_showtableborders_gecko.css

     文件        288  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\block_address.png

     文件        293  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\block_blockquote.png

     文件        229  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\block_div.png

     文件        218  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\block_h1.png

     文件        220  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\block_h2.png

     文件        219  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\block_h3.png

     文件        229  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\block_h4.png

     文件        236  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\block_h5.png

     文件        216  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\block_h6.png

     文件        205  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\block_p.png

     文件        223  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\block_pre.png

     文件        184  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\fck_anchor.gif

     文件        599  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\fck_flashlogo.gif

     文件        105  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\fck_hiddenfield.gif

     文件         54  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\fck_pagebreak.gif

     文件       1709  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\css\images\fck_plugin.gif

     文件       1773  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\dialog\common\fck_dialog_common.css

     文件       9468  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\dialog\common\fck_dialog_common.js

     文件         74  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\dialog\common\images\locked.gif

     文件        104  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\dialog\common\images\reset.gif

     文件         75  2012-08-21 09:23  在线文档管理系统\Backup\fckeditor\editor\dialog\common\images\unlocked.gif

............此处省略1577个文件信息

评论

共有 条评论