有沒有辦法將LinkedResource
的ContentDisposition
設置爲inline
,即在圖像的情況下?如何在LinkedResource中設置ContentDisposition?
這裏是我如何建立我的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)