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

Issue 668773 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug



Sign in to add a comment

Filename suggestions (onDeterminingFilename) cause browser to always use default folder

Reported by colin@colincampbell.me, Nov 26 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36

Steps to reproduce the problem:
1. Download an image using "Save as" with the extension enabled and select a non-default destination folder.

2. Attempt to download a different image using the same method.

3. Take note of the folder selected by the browser in the dialog.

What is the expected behavior?
The file download dialog should default to the last used folder, consistent with the behavior of the browser without the extension installed.

What went wrong?
The browser forgets the previous destination folder and falls back to the user's default.

Attached is a minimal sample extension that causes the issue to occur.

WebStore page: https://chrome.google.com/webstore/detail/image-extension-fix/bdinnahhocpbhaolpffbceckdfiafffn

Did this work before? No 

Chrome version: 54.0.2840.99  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 23.0 r0
 
example.zip
595 bytes Download
Labels: -Pri-2 M-54 Needs-Triage-M54 Pri-1
Cc: sureshkumari@chromium.org
Labels: -M-54 M-57 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on windows-7,Window-10, Mac-10.11.6 and Linux Ubuntu-14.04 using chrome stable version 55.0.2883.75 and latest canary 57.0.2943.0 with below steps
1.Opened Chrome.
2.Added the Extension "Image Extension Fix" to chrome..
3.Downloaded the image and saved in pictures folder.
4.Again Downloaded different image and saved.
Observed that the image not saved in pictures folder .Its saved in Downloads folder (Default).

This is non-regression issue observed from M-30 # 35.0.1550.0. Hence marking it as Untriaged to get it addressed.

Thanks.
Status: WontFix (was: Untriaged)
The attached extension uses a listener for chrome.downloads.onDeterminingFilename and within the callback uses the suggest function passed to the listener to suggest a filename. 

The behavior you're seeing is working as specified though:

https://developer.chrome.com/extensions/downloads#event-onDeterminingFilename

says that the filename parameter passed to suggest is "a path relative to the user's default Downloads directory, possibly containing subdirectories."


Since this is the intended behavior, is there any way of specifying that the suggested filename is the name of a file (exclusive of a directory path) using the current API?

This would be valuable for use cases like mine (the extension only suggests file extensions), and several of the users of my extension have requested this functionality (Chrome remembering their last used download directory).

If not, where is the appropriate place to discuss this as an improvement to the current Extension API? I see that there does exist a discussion group (https://groups.google.com/a/chromium.org/forum/#!forum/chromium-extensions) but it also says that it's not actively monitored.

Thanks!

Sign in to add a comment