Switch to Bing in English
Copilot
Your everyday AI companion
About 1,640,000 results
    Upvotes795Top Answeredited Oct 7, 2021 at 7:34

    RFC 7111

    There is an RFC which covers it and says to use text/csv.

    This RFC updates RFC 4180.

    Excel

    Recently I discovered an explicit mimetype for Excel application/vnd.ms-excel. It was registered with IANA in '96. Note the concerns raised about being at the mercy of the sender and having your machine violated.

    Media Type: application/vnd.ms-excel

    Name Microsoft Excel (tm)

    Required parameters: None

    Optional parameters: name

    Encoding considerations: base64 preferred

    Security considerations: As with most application types this data...

    Content Under CC-BY-SA license
    Was this helpful?
  1. What MIME type should I use for CSV? - Stack Overflow

  2. PHP: mime_content_type - Manual

  3. People also ask
    The mime type of the file, if the browser provided this information. An example would be "image/gif". This mime type is however not checked on the PHP side and therefore don't take its value for granted. So as you can see, even if $_FILES ['userfile'] ['type'] is specified, it only corresponds to the Content-Type header sent by the client.
    Although text/csv is the recommended MIME type for CSV files, some browsers or applications might still recognize and handle other MIME types for CSV files. It's worth noting that you could try one of the following alternative MIME types, especially when dealing with legacy applications:
    mime_content_type (PHP 4 >= 4.3.0, PHP 5, PHP 7) mime_content_type — Detect MIME Content-type for a file Description mime_content_type ( resource|string $filename ) : string|false Returns the MIME content type for a file as determined by using information from the magic.mime file. Parameters filename Path to the tested file.
    An example would be "image/gif". This mime type is however not checked on the PHP side and therefore don't take its value for granted. So as you can see, even if $_FILES ['userfile'] ['type'] is specified, it only corresponds to the Content-Type header sent by the client. This information can easily be faked and should not be relied upon.
  4. 【PHP】PHP8.0以降の mime_content_type でCSVファイルが ...

  5. Common MIME types - HTTP | MDN - MDN Web Docs

  6. PHP: mime_content_type - Manual

  7. よくある MIME タイプ - HTTP | MDN - MDN Web Docs

  8. Sending a CSV File as an HTTP Response – devgem.io

  9. mime_content_type - PHP Documentation - TypeError

  10. PHP: mime_content_type - Manual - php.sh

  11. PHP】アップロードされたファイルの種類をどうやって確認 ...

By using this site you agree to the use of cookies for analytics, personalized content, and ads.Learn more about third party cookies|Microsoft Privacy Policy