• 封装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
  • 相关阅读:
    sqlitespy sqlite 开发工具
    Visual Studio Installer问题:Your machine is busy installing a program other than Visual Studio
    k8s按照创建顺序展示pod
    tmux: open terminal failed: missing or unsuitable terminal: xterm256color
    ubuntu删除源
    docker打包容器
    docker中文乱码
    OpenPAI之进入dev box容器
    apt依赖出错问题修复
    ubuntu关闭swap
  • 原文地址:https://www.cnblogs.com/pjh7/p/8601503.html
Copyright © 2020-2023  润新知