Exemplo n.º 1
0
        /// <summary>
        /// 保存到TmpFile文件夹
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        public static string SaveAsTmp(HttpPostedFileBase file)
        {
            string fileName = LibFileHelper.CreateFullTmpFilePath(Path.GetFileName(file.FileName));

            file.SaveAs(fileName);
            return(fileName);
        }
Exemplo n.º 2
0
        public static string SaveUploadCertificate(HttpPostedFileBase file, string staffNr)
        {
            string filePath = LibFileHelper.CreateFullUPloadFilePathForCertificate(Path.GetFileName(file.FileName), staffNr);

            file.SaveAs(filePath);

            string fileName = filePath.Split('\\')[filePath.Split('\\').Length - 1];

            return(fileName);
        }
Exemplo n.º 3
0
        public static string SaveUploadImage(HttpPostedFileBase file)
        {
            string filePath = LibFileHelper.CreateFullUPloadImageFilePath(Path.GetFileName(file.FileName));

            file.SaveAs(filePath);

            string fileName = filePath.Split('\\')[filePath.Split('\\').Length - 1];

            return(fileName);
        }