|
@@ -357,10 +357,12 @@ namespace Learun.Application.WebApi.Modules |
|
|
{ |
|
|
{ |
|
|
var files = (List<HttpFile>)this.Context.Request.Files; |
|
|
var files = (List<HttpFile>)this.Context.Request.Files; |
|
|
var folderId = this.GetReq<FileModel>().folderId;//文件夹id=新生id |
|
|
var folderId = this.GetReq<FileModel>().folderId;//文件夹id=新生id |
|
|
|
|
|
var name = this.GetReq<FileModel>().name;//文件夹id=新生id |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string filePath = Config.GetValue("AnnexesFile"); |
|
|
string filePath = Config.GetValue("AnnexesFile"); |
|
|
string uploadDate = DateTime.Now.ToString("yyyyMMdd"); |
|
|
string uploadDate = DateTime.Now.ToString("yyyyMMdd"); |
|
|
string FileEextension = Path.GetExtension(files[0].Name); |
|
|
|
|
|
|
|
|
string FileEextension = name; |
|
|
string fileGuid = Guid.NewGuid().ToString(); |
|
|
string fileGuid = Guid.NewGuid().ToString(); |
|
|
|
|
|
|
|
|
string virtualPath = string.Format("{0}/{1}/{2}/{3}{4}", filePath, userInfo.userId, uploadDate, fileGuid, FileEextension); |
|
|
string virtualPath = string.Format("{0}/{1}/{2}/{3}{4}", filePath, userInfo.userId, uploadDate, fileGuid, FileEextension); |
|
@@ -496,6 +498,7 @@ namespace Learun.Application.WebApi.Modules |
|
|
public class FileModel |
|
|
public class FileModel |
|
|
{ |
|
|
{ |
|
|
public string folderId { get; set; } |
|
|
public string folderId { get; set; } |
|
|
|
|
|
public string name { get; set; } |
|
|
public string id { get; set; } |
|
|
public string id { get; set; } |
|
|
} |
|
|
} |
|
|
} |
|
|
} |