I have the following link in my Node-Webkit app
<a id="updateAppVersion" href="http://<some_path>/newVersion.zip">New version available</a>
This link works fine, it displays the 'save as' dialog and the user can save the file normally.
My question is, is there an easy way to display the download progress inside the app like browsers do or i need to create my own? (if so how?).
Currently nothing is displayed when the user chooses the download location.
I don't think that nwjs includes this feature. If you choose to write your own mechanism, try request-progress:
Tracks the download progress of a request made with mikeal/request,
giving insight of various metrics including progress percent, download
speed and time remaining
check this answer for more options.
Related
I'm working on a chrome extension that scrapes pages and downloads images within the page. However, I've run into a sort of roadblock.
Since the extension is designed to download several files at once, I'd like for the user to be able to click the 'Download' button, select a folder, then download all the images to that folder.
So far, the only thing I've seen that might be of use is the saveAs option in chrome.downloads.download(). However, it would be very tedious for the user to have to select a location and confirm for every file. Is there a way I can have the user select a folder, then just download all the files to that specific folder?
Let me know if I need to include any specific code. Figured it wasn't very important, since I don't even have code pertaining to this question currently.
Unfortunately you cannot. Your options are
Ask the user each time
Save the files to the downloads folder set by the user or a sub folder
Although much more complicated you could use native messaging and have native code communicate with the extension. You could then wait for the extension to complete the download and then send a message to your native host with the full path. Then your native host can move the file to where you want.
looking for some help with a rather unique or interesting issue. I am currently in the process of creating a website and would like to implement the following.
I have a download button where the end user can click download - Easy enough.
The complicated part is achieving the following
I would like to provide (automatically) the correct file for the user based on their operating system, so if the user is using windows and clicks the download button the windows file will be downloaded, and the opposite applies for mac.
any help is appreciated.
I want to know if it's possible to launch windows applications from a website. If it is possible, how? Sort of like battlelog for battlefield, when a button is pushed it opens an application.
Edit: This is for personal use
Try this:
Make each button be a link to download a company template file for the given application. For example, the "Excel" button would download and the user should be prompted to open it with Excel.
For instance, try clicking one of the links here:
http://www.google.com/#sclient=psy&hl=en&q=template+filetype:xls
Linking to static files on the web server should be sufficient, so long as your server sends the correct MIME-Type or Content-Type.
HOPE it helps!
Take a look at this thread. it should point you in the right direction. In short you can do this in IE using ActiveX objects. But I must warn you that it is a very bad idea
Does anybody know a way I can automate the right click and save as actions for IE, Chrome and Firefox?
I am doing some selenium work using Maven and need to be able to download some files but I am unable to do this as the save as windows cannot (to my knowledge) be automated by Selenium as they are OS dialogs.
I disagree with Bob, Bill and the author of the article that is linked to in the other answer.
Downloads can be automated. The downloaded file can be meaningfully verified. In simplest case you can compare the contents of downloaded file with an existing exemplary file.
(Disclaimer: the next paragraph is about a tool which I am affiliated with).
For example if you use RIATest for automation you can automate the right click, then automate the OS dialog, then wait until the download is finished and verify the content of the downloaded file.
I would like to display the latest top 3-5 entries of my extension change log (TXT file) when it's auto-updated and ideally in a balloon-type event like the one when you have successfully installed an extension. It should show/popup near the wrench-icon area. Like a replacement for #history that GM scripts have.
There are already a few SO questions about how to get extension version like here.
There are also one here to detect if it's an install or update based on version.
It is not desktop notifications I want.
My question is how to make the balloon and populate it with the lines.
An alternative is open my options.html page in a new tab and show the change log entries there somehow. Requires tabs permission in the manifest.json file.
chrome.tabs.create({url:chrome.extension.getURL('options.html')});
Any ideas how to do this?
Or is this impossible to do?
There's neither a mechanism to create a "balloon" notification (that's reserved for native Chrome code), nor to pop out the popup without user interaction. Your automatic notification methods are fairly limited: creating a new tab with a changelog is certainly possible, but not particularly user-friendly (since it will simply open at some arbitrary time, completely remote from the user's intent).
If possible, I'd suggest waiting to notify the user until she interacts in some way with the extension. Clicking on a page-action, for instance, could have some sort of infobar-like note at the top of the popup's UI inviting the user to read more about the update.