有没有办法将ContentDisposition
a设置LinkedResource
为inline
,即在图像的情况下?
这是我现在的构建方式LinkedResource
:
Dim img As LinkedResource = New LinkedResource(filePath)
Dim fileType As String = ""
Dim attName As String = "image" + fileName + "." + fileExt
If (fileExt = "jpg" Or fileExt = "jpeg") Then
img.ContentType.MediaType = System.Net.Mime.MediaTypeNames.Image.Jpeg
ElseIf (fileExt = "gif") Then
img.ContentType.MediaType = System.Net.Mime.MediaTypeNames.Image.Gif
ElseIf (fileExt = "png") Then
img.ContentType.MediaType = "image/png"
End If
img.ContentId = attName
img.ContentType.Name = attName
linkedResources.Add(img)