-
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a saveAs
option to prompt a dialog instead of downloading immediately
#4
Conversation
Why not just do a proper workaround and append a number to the file name? That's pretty easy. As a user I don't want to be bothered with a save dialog. I just want to have the file saved. |
Well I'd want both really. Sometimes I want to save the file to a specific location. This is in fact what Chrome has in the context menu. There's also the shortcut to hold down option to download immediately (which is what I use when I don't want to be bothered). Having electron support the incrementing number is the best solution really. Just appending a number can get ugly if it happens more than once, you'd want an intelligently incrementing number really. Besides, more work than I want to put into this now. |
Travis failure looks unrelated to my changes. Possibly due to an xo update. |
With the Electron fix, I agree, but as a quick workaround, you can just append a number each time. I find it pretty edge-casy to have many identically named files in |
|
||
Show a "Save As…" dialog instead of downloading immediately. | ||
|
||
Useful if you're concerned about overriding existing files. See [issue #3](https://github.com/sindresorhus/electron-dl/issues/3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this can be a useful feature, but I don't like it as a workaround. I'd rather add it for the right reasons.
Can you remove this and I'll add a proper workaround after this is merged.
👌 |
I'll work on a fix to the overwriting problem tonight. |
@jwheare Thanks for adding this feature. It's really helpful. @sindresorhus Is it possible to get the new file path synchronously in the renderer process? |
That's why Electron needs a
Get it from where? I'm not sure how this question is relevant to this module. |
I was going to use this module in the renderer process, with the The |
Added to allow working around #3, and also nice to have the option.