我正在摸不着为什么不这样做:
@if (Model.Guid != null) { Html.ActionLink("Fil", "GetFile", new { id = Model.DocumentID }); }
Run Code Online (Sandbox Code Playgroud)
条件本身就是将som随机HTML放在那里而不是actionlink工作:
@if (Model.Guid != null){<span>Test</span>}
Run Code Online (Sandbox Code Playgroud)
同样,它自己的动作链接也没有问题.
有人能告诉我这里发生了什么吗?
基于此处的 stimms 答案: Azure Storage API ContentDisposition
以及在此处找到的信息: 公开下载 Azure blob 时的友好文件名
我已经能够在上传新文件时设置内容配置。但我也希望能够设置现有文件的内容配置。
blob.Properties.ContentDisposition = string.Format("attachment;filename=\"{0}\"", friendlyName);
Run Code Online (Sandbox Code Playgroud)
在上传文件之前设置时工作正常,但如果我在现有 blob 上尝试它则无效。
更改现有 blob 的内容配置是完全不可能的,还是我做错了什么?