【发布时间】:2011-03-31 15:15:53
【问题描述】:
我需要设置一个文件处理程序来路由多个子目录,例如 tihs;
http://localhost/images/7/99/786936215595.jpg
我尝试将其放入 global.asax 文件中;
routes.Add(
"ImageRoute",
new Route("covers/{filepath}/{filename}",
new ImageRouteHandler()));
我正在使用 Question 中的 ImageHandler,如果您有一个子目录(即“/images/15/786936215595.jpg”),它会很好用,但当您有多个目录时会失败。
我尝试设置通配符但没有用(即'new Route("covers/{filepath}/*/{filename}"')
这是从大型 NAS 提供图像(想像 300 万张图像),所以我不能只是移动文件。
谢谢!
【问题讨论】:
标签: asp.net asp.net-mvc-2 routing