示例#1
0
        public string MemberDocumentUploader(HttpPostedFileBase uploadedFile, string memberId)
        {
            string filePath = string.Empty;

            if (uploadedFile != null)
            {
                string Filename = uploadedFile.FileName;
                string path     = Server.MapPath("~/MemberDocuments/");
                if (!Directory.Exists(path))
                {
                    Directory.CreateDirectory(path);
                }

                filePath = path + Path.GetFileName(uploadedFile.FileName);
                string extension = Path.GetExtension(uploadedFile.FileName);
                uploadedFile.SaveAs(filePath);
                var response = _memberServices.UploadFile(Filename, memberId);
                return(response);
            }
            return("null");
        }