Electron write file to downloads
Improve this question. Add a comment. Active Oldest Votes. You can do it using FileReader and Buffer. See Electron Security suggestions. Improve this answer. Danteinus Danteinus 1 1 silver badge 6 6 bronze badges. Sorry for coming to you a bit late. But haven't had time to try your solution until today. And it is working well, thank you. I only have one more issue in the output file.
When I try to play it with any video player, it does not show the length of the video correctly, it shows only it has 1 sec of video, and even that the 1 second ends it keeps playing the video fully.
Yes I have the same issue. Sorry, something went wrong. I'm not able to reproduce the bug locally; but given the description that it only occurs some of the time, perhaps that's to be expected. Looks like that code in question changed about 5 months ago with Pinging zcbenz who authored that PR and nornagon who reviewed; does the diff in comment seem reasonable?
Actually khwaaj even better, could you submit a new PR against the master branch in Electron containing this diff, with a description pointing back to this issue URL? Yes, my conclusion is also that introduced the race, but it doesn't seem to trigger easily in normal use so it probably went mostly unnoticed until now.
I would expect reproducibility varies depending on the executing environment. We had added a test to ensure the download continued correctly, and it seems to be passing here - I'll let nornagon also take a look, but this change seems safe. Thanks for fixing this.
We spent quite some time understanding what was causing electron-updater to fail completing the download. Skip to content. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast what if you could invest in your favorite developer?
Who owns this outage? Building intelligent escalation chains for modern SRE. Featured on Meta. You may also want to check out these Nodejs packages which help simplify saving files directly to the host machine If you intend for users to save files you might also have a look at the Dialog api where you can specifically invoke a save dialog for that purpose.
This will save the content in myfile. If you want to write, let's say in the user's home directory, you can use the app. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Saving files locally with electron Ask Question. Asked 5 years, 4 months ago.
Active 1 month ago. Viewed 96k times. Is there any module I can use to let Electron save files locally? Improve this question.
0コメント