Uploaded image for project: 'PUBLIC - Liferay Portal Enterprise Edition'
  1. PUBLIC - Liferay Portal Enterprise Edition
  2. LPE-2168

MimeTypesUtil.getContentType() now gives preference to the file name

Details

    Description

      MimeTypesUtil.getContentType() is used to determine the content type of a file. Previously, the content of the file is examined to determine the content type. If the content type can not be determined based on the file content, the file extension is used to determine the content type. With this improvement, the file extension will be used to determine the content type before examining the content of the file. This change improves performance.

      This change also applies to FileUtil.extractText() since it relies on MimeTypesUtil.getContentType().

      Attachments

        Issue Links

          Activity

            People

              sophia.zhang Sophia Zhang
              brian.chan Brian Chan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Packages

                  Version Package
                  5.1 EE SP5 (5.1.8)
                  5.2 EE SP4 (5.2.8)