Open option in DownloadDialog for CEF

Having problems with building or using the JCEF Java binding? Ask your questions here.

Open option in DownloadDialog for CEF

Postby ramyakrishnan » Fri Jan 08, 2016 1:41 pm

I am designing a DownloadDialog box for my browser. I want to have an option to just open the file directly from the browser without saving as one of the initial option as soon as a user clicks a download link . Eg: how IE download dialog work..Is it possible in CEF ? IF so how / where can i find a reference for this.( As the example downloadDialo.java did not have this )
ramyakrishnan
Mentor
 
Posts: 62
Joined: Wed Sep 16, 2015 12:21 pm

Re: Open option in DownloadDialog for CEF

Postby magreenblatt » Fri Jan 08, 2016 1:51 pm

You would need to use OS functions. For example, on Windows you would call the ShellExecute function. Maybe there's some API for this in Java as well.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Open option in DownloadDialog for CEF

Postby ramyakrishnan » Fri Jan 08, 2016 2:20 pm

Thank you
ramyakrishnan
Mentor
 
Posts: 62
Joined: Wed Sep 16, 2015 12:21 pm

Re: Open option in DownloadDialog for CEF

Postby ramyakrishnan » Fri Jan 08, 2016 4:12 pm

Hi Marshall ,

I tried the ShellExecute that you had mentioned , since I am using Windows , I tried to do "start <filename> " however, I am not quiet sure what I must use in the "filename" that could potentially start the file directly. i tried my shellcommand to be like ( "start "+ suggestedName ) , however that would be wrong as such a file will not exist. Any suggestions ?
ramyakrishnan
Mentor
 
Posts: 62
Joined: Wed Sep 16, 2015 12:21 pm

Re: Open option in DownloadDialog for CEF

Postby magreenblatt » Fri Jan 08, 2016 4:37 pm

magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 20 guests