2
我如何使StaticFile處理程序只提供實際存在的文件,並使其他人轉到asp.net mvc管道或自定義http處理程序。服務靜態文件,如果它存在,否則創建它
1) GET /images/file.jpg
exists => serve it (StaticFile handler/as efficiently as possible)
2) GET /images/file_640x480.jpg
1. request (doesn't exist)
* load file.jpg
* resize
* save as file_640x480.jpg
=> serve from memory
following requests
=> should use 1) because the file is now there
這是瑣碎<modules runAllManagedModulesForAllRequests="true" />
但我想這更多的是一種解決方法不能真正解決問題的。