Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

How to use "--file-download-options" with "onCompleted" #1571

Open
5 tasks done
mpetereit opened this issue Sep 8, 2023 · 0 comments
Open
5 tasks done

How to use "--file-download-options" with "onCompleted" #1571

mpetereit opened this issue Sep 8, 2023 · 0 comments
Labels

Comments

@mpetereit
Copy link

Homework

Your question

Hello :)

I have a question regarding the "--file-download-options" Option. There are many examples with the "saveAs" flag but I found not a single example how the "onCompleted" Flag works. Specifically how do i create a Nativefier command with it / how is the correct syntax?

My Problem:
A Customer wants so show a website that runs a workforce managment system. The Users are not allowed to play around with the browser and surf the web. So Nativefier was the prefered choice.
On this website is also a Messanger Tool where Users can send Files to each other.... So far so good.

Right now, each time a user clicks on a download Button of a File inside the Messanger the Windows Explorer Opens so the User can save the File.

The goal:
If a User gets sent a PDF File and another user clicks on it, then a new Browser Windows should open that PDF File.

I have no real experience with JS and how the syntax works. Atleast I think that the Code should be something like "window.open(file)" but I have no idea how to pass it to the "onComplete" Flag or how thy correct syntax would be.

Or maybe there is an even easier way to do it....

thanks in advance :)

Steps to reproduce

nativefier --verbose --some-option https://mysite.com
<paste your verbose build logs, if relevant to your question>

Debug info

No response

Nativefier version

52.0.0

Node.js version

18.16.1

npm version

8.1

OS

Windows 10

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant