| | |
| | | public class UploadController : ApiController |
| | | { |
| | | [HttpPost] |
| | | public Task<IEnumerable<FileDesc>> Post([FromUri]string path) |
| | | public Task<IEnumerable<FileDesc>> Post([FromUri] string path, [FromUri] string token) |
| | | { |
| | | if (string.IsNullOrEmpty(token) || !ExportUtil.VerifyToken(token)) |
| | | { |
| | | throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.Unauthorized, "令牌为空或无效!")); |
| | | } |
| | | |
| | | //string root = HttpContext.Current.Server.MapPath("~/uploads"); |
| | | if (string.IsNullOrEmpty(path)) return null; |
| | | string root = Path.Combine(Tools.GetSetting("tempFolder"), path); |