zoukankan      html  css  js  c++  java
  • 封装jquery插件 uoload file

    后台代码:


        for (int i = 0; i < request.Files.Count; i++)
                {
                    var file = request.Files[i];
                    string key = request.Files.GetKey(i);
                    if (key.Equals("image"))//uploadfile.js file name
                    {
                        DocumentFileDataInfo fileInfo = new DocumentFileDataInfo()
                        {
                            Name = file.FileName,
                            Suffix = Path.GetExtension(file.FileName),
                            Stream = file.InputStream,
                            CreationUserID = CurrentUser
                        };
                        data.ImageUploadDocumentFiles.Add(fileInfo);
                    }
                    if (key.Equals("file"))
                    {
                        DocumentFileDataInfo fileInfo = new DocumentFileDataInfo()
                        {
                            Name = file.FileName,
                            Suffix = Path.GetExtension(file.FileName),
                            Stream = file.InputStream,
                            CreationUserID = CurrentUser
                        };
                        data.AttachmentUploadDocumentFiles.Add(fileInfo);
                    }
                }


    git:
    https://github.com/pijiahao/upload-file.git
  • 相关阅读:
    java基础
    HDOJ(HDU).2266 How Many Equations Can You Find (DFS)
    POJ.1416 Shredding Company (DFS)
    HDOJ(HDU).2044-2049 递推专题
    HDOJ(HDU).1045 Fire Net (DFS)
    HDOJ(HDU).1258 Sum It Up (DFS)
    HDOJ(HDU).1241 Oil Deposits(DFS)
    我的ACM参赛故事
    HDOJ(HDU).1035 Robot Motion (DFS)
    HDOJ(HDU).1016 Prime Ring Problem (DFS)
  • 原文地址:https://www.cnblogs.com/pjh7/p/8601503.html
Copyright © 2011-2022 走看看