New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 800734 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

Problem in opening downloaded files due to inappropriate way of determining file type

Reported by cvivek...@gmail.com, Jan 10 2018

Issue description

Steps to reproduce the problem:
1. Launch chrome
2. Download a file having 2 dots(.) like abc.pqr.pdf

What is the expected behavior?
Chrome must open the pdf or other file automatically or at least manually.

What went wrong?
Chrome shows can't open file as it determines file type from what is written after very first dot(.) of the file name.

Did this work before? N/A 

Chrome version: 62.0.3202.84  Channel: stable
OS Version: 4.4.2
Flash Version: 

Quite serious issue. It must be immediately rectified for a good user experience
 
Labels: Needs-triage-Mobile
Cc: pnangunoori@chromium.org
Components: UI>Browser>Downloads
Labels: Needs-Feedback Triaged-Mobile
Tested the issue in Android and not able to reproduce the issue.

Steps Followed:
1. Launched the Chrome Browser.
2. Navigated to Gmail.com and tried downloading a PDF file which has two .'s Eg.: abc.def.pdf
3. Navigate to Chrome Menu >> Downloads.
4. Tap on the downloaded file.
5. Observed that PDF file is opened successfully.


Chrome versions tested:
63.0.3239.111(Stable)

OS:
Android 7.0.0

Android Devices:
SM-J710F Build/NRD90M

@cvivek503 -- Could you please provide the sample URL to download such files. You can also verify by updating your Chrome to latest stable version #63.0.3239.111.

Also, could you please provide your device details where the issue is reproduced.

Thanks in advance!
Owner: xingliu@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 4 by qin...@chromium.org, Jan 11 2018

Cc: xingliu@chromium.org nyerramilli@chromium.org qin...@chromium.org sandeepkumars@chromium.org
 Issue 800763  has been merged into this issue.

Comment 5 Deleted

Comment 6 by cvivek...@gmail.com, Jan 12 2018

I was wrong in stating the bug. The   Issue 800763   has the correct issue stated. Extremely sorry for the mess caused because of me.
Labels: -Pri-2 Pri-1

Comment 8 by cvivek...@gmail.com, Jan 12 2018

Replying to pnangunoori@chromium.org
The sample URL is the same as in  Issue 800763  i.e kupdf.com
My device is Xolo Q1200.
I have tested this issue in the latest stable version(from play store) and I am able to reproduce it.
Status: Started (was: Assigned)
The mime type is "application/download" for kupdf.com, in this case we don't auto open. "application/pdf" is actually a better mime type for kupdf.com.

Also we use Android intent to open the file, where we also pass the mime type "application/download" and uri to android.

For now, it seems not to be really related to the "two dot" in the uri.

Comment 11 Deleted

Chrome probably should at least let the user to pick another app to open the file if the mime type can't be handled. 
Talked offline with qinmin@, we already fixed some mime types in ChromeDownloadDelegate, including "application/force-download". 

Other browsers also fix the mime type based on file extension.  So ChromeDownloadDelegate is probably the right place to handle "application/download".
Project Member

Comment 14 by bugdroid1@chromium.org, Jan 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f8c794328fcc9cf8e2e66fbfc8d45ad2bd140d4d

commit f8c794328fcc9cf8e2e66fbfc8d45ad2bd140d4d
Author: Xing Liu <xingliu@chromium.org>
Date: Sat Jan 13 00:49:06 2018

Android Download: Handle application/download mime type.

When trying to open a file with mime type "application/download", we
currently use Android intent to open a file, where Android can't handle
it and will always throw exception. For users, there is no further action
available but seeing a "Can't open file." toast.

This CL adds logic to deduct and change the mime type based on file
extension so Android can use best effort to handle this mime type.

Bug:  800734 , 800763 
Change-Id: I9bef10c057c9480a7089b247242e3d7a6a41f53d
Reviewed-on: https://chromium-review.googlesource.com/865541
Commit-Queue: Xing Liu <xingliu@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529122}
[modify] https://crrev.com/f8c794328fcc9cf8e2e66fbfc8d45ad2bd140d4d/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java

Status: Fixed (was: Started)
So this issue is not eligible for bounty ?
No, bounty is only for security bugs

Sign in to add a comment