我一直在我们的网络应用中使用ImageResizer.net,但现在我需要它来调整图像大小,并提供不具有文件扩展名的图像,如下所示:ImageResizer和没有扩展名的图像文件
http://localhost:58306/ClientImages/Batch/2012/12/10/f45198b7c452466684a4079de8d5f85f?width=600
在这种情况下,我知道我的文件总是TIFF的,但他们没有文件扩展名。
我有什么选择?
/resizer.debug.ashx:https://gist.github.com/raw/9c867823c983f0e5be10/4db31cb21af8b9b36f0aa4e765f6f459ba4b309f/gistfile1.txt
更新
我跟着电脑语言学家的指示:
protected void Application_Start()
{
Config.Current.Pipeline.PostAuthorizeRequestStart +=
delegate
{
var path = Config.Current.Pipeline.PreRewritePath;
var clientImgsRelPath = PathUtils.ResolveAppRelative("~/ClientImages/");
var isClientImageRequest = path.StartsWith(clientImgsRelPath, StringComparison.OrdinalIgnoreCase);
if (isClientImageRequest)
Config.Current.Pipeline.SkipFileTypeCheck = true;
};
// other app start code here
}
http://localhost:58306/ClientImages/Batch/2012/12/10/92d67b45584144beb5f791aaaf760252?width=600
只是没有调整原始图像大小响应。
这也被问及在这里:http://imageresizing.net/docs/howto/cache-non-images#comment-571615564
这是无论你怎么称呼它与卡西尼开发或Visual Studio Web服务器或期间发生。
谢谢,但你能看到我的更新吗? –
您是否试过指定'&process = always'来强制处理作为图像? –