MimeTypeFilter#accept() takes two values as parameters:
uri and mimeType
- The file extension (e.g. .png) is extracted from the URI and is used for filtering
- The mimeType is used as is
WebApkShareTargetUtil#computeMultipartPostData() currently passes the content URI as the uri parameter to MimeTypeFilter#accept()
The content URI usually does not have a file extension
The share data name, extracted via WebApkShareTargetUtil#getFileNameFromContentUri() sometimes has a file extension
If the file name is available, we should pass the file name instead of the content URI to MimeTypeFilter#accept()
Comment 1 by pkotw...@chromium.org
, Nov 23