久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<legend id='eA8UZ'><style id='eA8UZ'><dir id='eA8UZ'><q id='eA8UZ'></q></dir></style></legend>
      <bdo id='eA8UZ'></bdo><ul id='eA8UZ'></ul>
    <tfoot id='eA8UZ'></tfoot>

      1. <i id='eA8UZ'><tr id='eA8UZ'><dt id='eA8UZ'><q id='eA8UZ'><span id='eA8UZ'><b id='eA8UZ'><form id='eA8UZ'><ins id='eA8UZ'></ins><ul id='eA8UZ'></ul><sub id='eA8UZ'></sub></form><legend id='eA8UZ'></legend><bdo id='eA8UZ'><pre id='eA8UZ'><center id='eA8UZ'></center></pre></bdo></b><th id='eA8UZ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='eA8UZ'><tfoot id='eA8UZ'></tfoot><dl id='eA8UZ'><fieldset id='eA8UZ'></fieldset></dl></div>

        <small id='eA8UZ'></small><noframes id='eA8UZ'>

      2. 確定 MAC 上傳流文件的 MIME 類型

        Determining MIME Type of MAC upload stream file(確定 MAC 上傳流文件的 MIME 類型)
        <tfoot id='icOhm'></tfoot>
        <i id='icOhm'><tr id='icOhm'><dt id='icOhm'><q id='icOhm'><span id='icOhm'><b id='icOhm'><form id='icOhm'><ins id='icOhm'></ins><ul id='icOhm'></ul><sub id='icOhm'></sub></form><legend id='icOhm'></legend><bdo id='icOhm'><pre id='icOhm'><center id='icOhm'></center></pre></bdo></b><th id='icOhm'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='icOhm'><tfoot id='icOhm'></tfoot><dl id='icOhm'><fieldset id='icOhm'></fieldset></dl></div>

          <small id='icOhm'></small><noframes id='icOhm'>

            <bdo id='icOhm'></bdo><ul id='icOhm'></ul>

                <tbody id='icOhm'></tbody>
            • <legend id='icOhm'><style id='icOhm'><dir id='icOhm'><q id='icOhm'></q></dir></style></legend>

                • 本文介紹了確定 MAC 上傳流文件的 MIME 類型的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有一個簡單的 Web 表單,可以通過 .NET C# 發送和發送電子郵件.此外,還有一個 ASP UPLOAD ctrl,我從中創建一個內存流并將該流附加到郵件消息...即無需將文件保存到文件系統.

                  I have a simple web form that sends and email out via .NET C#. Additionally there is an ASP UPLOAD ctrl from which I create a memory stream and attach the stream to the Mail Message...ie no need to save file to file system.

                  問題:當 MAC 用戶在他們上傳的文件中不包含擴展名時(我正在測試 PostedFile.ContentType 以確定文件和/或適當的擴展名、允許的文件 RTF、TXT、PDF、DOC、DOCX),它看起來像 ContentType以應用程序/八位字節"的形式返回……這對我來說很有意義,沒有 PC 要求的擴展,但是;仍然不清楚天氣讀取 ContentType 或擴展名是在我附加之前確定它是什么類型的文件的更好方法.[無擴展的 MAC 文件顯然無法通過任何擴展測試]

                  ISSUE: When MAC users dont inlcude extensions on their uploaded files (I am testing for PostedFile.ContentType to determine the file and/or appropriate extension, allowable files RTF, TXT, PDF, DOC, DOCX) it seems like the ContentType comes back as "application/octet"...this makes some sense to me w/o an extension as required by PCs but; still unclear on weather reading the ContentType or extension is a better way to determine what type of file it is before I attach. [Extensionless MAC file will obviously fail any extension test]

                  基本上,我從上傳 ctrl 讀取文件,確定它的 ContentType 是什么,只剝離 PostedFile.Filename,然后在我使用 switch 語句中的 ContentType 字符串創建附件時重新組裝,以確定并添加正確的擴展名附件(文件名+分機).我這樣做是為了確保不使用擴展的 MAC 用戶仍然可以在不創建 .ZIP 或其他包的情況下上傳.

                  Basically, I read the file from the upload ctrl, determine what its ContentType is, strip just the PostedFile.Filename and then reassemble as I create the attachment using the ContentType string in a switch statement to determine and add the correct extension to the attached file (filename + ext). I did this in order to ensure MAC users that dont use extensions can still upload w/o creating a .ZIP or other package.

                  問題 1:關于處理這個問題,我的邏輯是否合理,最佳實踐?問題 2:當不在 MAC 上使用擴展名時,所有 MAC 文件都會返回為application/octect"嗎?如果是這樣,有人如何確定它到底是什么類型的文件?(注意:在 MAC 平臺上不使用擴展時,PDF 工作正常).

                  Question 1: Is my logic sound with regards to approaching this issue, best practices? Question 2: Will all MAC files return as "application/octect" when not using an extension on MAC, and if so, how can someone determine what type of file it really is? (Note: PDF worked fine when not using extensions on MAC platform).

                  提前致謝.如果需要代碼示例,請告知.

                  Thanks in advance. If code sample is necessary please advise.

                  推薦答案

                  不要使用文件擴展名來計算 MIME 類型,而是使用Winista"進行二進制分析,請參閱我的方法here,如果 winista 則求助于 URLMon無法解決最后一個答案http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/d79e76e3-b8c9-4fce-a97d-94ded18ea4dd

                  假設有人用 jpg 擴展名重命名了一個 exe……你仍然可以確定真實"的文件格式.它不會檢測 swf 或 flv,但幾乎可以檢測所有其他眾所周知的格式 + 你可以獲取一個十六進制編輯器并添加更多它可以檢測到的文件.

                  下載 Winista:http://www.netomatix.com/Products/DocumentManagement/MimeDetector.aspx

                  Download Winista: http://www.netomatix.com/Products/DocumentManagement/MimeDetector.aspx

                  這個問題給了我一個好主意,因為您希望附加一個可以在 MAC 和 PC 上安全運行的文件擴展名我/您可以編輯 mime-types.xml 文件以包含可以打開的安全文件擴展名MAC 和 PC 上的特定文件類型.

                  This question has given me a great idea, since you wish to append a File Extension that will safely work on MACs and PCs I/you could edit the mime-types.xml file to include safe file extensions that will work to open specific file types on both MAC and PCs.

                  這篇關于確定 MAC 上傳流文件的 MIME 類型的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                  Calling A Button OnClick from a function(從函數調用按鈕 OnClick)
                    <tbody id='PK32z'></tbody>

                      • <legend id='PK32z'><style id='PK32z'><dir id='PK32z'><q id='PK32z'></q></dir></style></legend>
                        <tfoot id='PK32z'></tfoot>
                        <i id='PK32z'><tr id='PK32z'><dt id='PK32z'><q id='PK32z'><span id='PK32z'><b id='PK32z'><form id='PK32z'><ins id='PK32z'></ins><ul id='PK32z'></ul><sub id='PK32z'></sub></form><legend id='PK32z'></legend><bdo id='PK32z'><pre id='PK32z'><center id='PK32z'></center></pre></bdo></b><th id='PK32z'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='PK32z'><tfoot id='PK32z'></tfoot><dl id='PK32z'><fieldset id='PK32z'></fieldset></dl></div>
                          <bdo id='PK32z'></bdo><ul id='PK32z'></ul>
                          1. <small id='PK32z'></small><noframes id='PK32z'>

                          2. 主站蜘蛛池模板: 日朝毛片 | 久久婷婷麻豆国产91天堂 | 亚洲一区精品在线 | 国产视频导航 | 一级做a爰片性色毛片16美国 | 亚洲一区日韩 | 成人午夜精品 | 狠狠做深爱婷婷综合一区 | 亚洲国产成人在线视频 | 国产午夜精品理论片a大结局 | 日本成人中文字幕 | 一区二区三区欧美 | 国产不卡在线 | 国产亚洲精品久久久久动 | 亚洲第一天堂无码专区 | 中文字幕第十页 | 久久99网| 久久精品久久久久久 | 欧美中文字幕在线 | 欧美一区二不卡视频 | 日韩久久久久久 | 中文字幕中文字幕 | 日韩欧美一区二区三区在线播放 | 亚洲精品视频在线看 | 超碰在线播 | 伊人电影院av | 99国产精品99久久久久久 | 九九热免费观看 | av资源中文在线 | 国产精品毛片一区二区在线看 | 国产成人免费视频网站高清观看视频 | 国产精品毛片一区二区在线看 | 免费av电影网站 | 免费在线观看成年人视频 | 久久久欧洲 | 久久国产精品免费一区二区三区 | 自拍偷拍中文字幕 | 久久成人精品视频 | 精品成人一区 | 精精国产xxxx视频在线播放7 | 91精品国产91久久久久久最新 |