kazelee
1 天以前 6ed44f32c96a17fd10601a24c3c36ca1229bc89b
api/ImageController.cs
@@ -6,17 +6,12 @@
using System.Web.Http;
namespace HH.WCS.Mobox3.AnGang.api {
    //[RoutePrefix("api/image")]
    public class ImageController : ApiController {
        //private readonly string _baseStoragePath = HttpContext.Current.Server.MapPath("~/StaticStorage");
        private readonly string _baseStoragePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "StaticStorage");
        private readonly string[] _allowedExtensions = { ".jpg", ".jpeg", ".png", ".gif", ".bmp" };
        // 上传图片接口
        [HttpPost]
        //[ActionName("Upload")]
        //[Route("api/image/upload")]
        [Route("UploadImage")]
        public HttpResponseMessage UploadImage() {
            try {
@@ -72,7 +67,6 @@
        // 获取图片接口 - 实际由静态文件处理,这里只是示例
        [HttpGet]
        //[ActionName("Get")]
        [Route("static/image/{year}/{month}/{day}/{filename}")]
        public HttpResponseMessage GetImage(string year, string month, string day, string filename) {
            try {