Disable all file uploads

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Disable all file uploads

Postby ovidiuppp » Thu Mar 19, 2020 11:15 am

Hello!

I'm developing a C# application that uses chromium as a web browser and it always needs to display a specific screen. I found out that I can drag and drop a file(.pdf for example) and it will render the .pdf over my screen. Is there a way to disable file upload(or at least .pdf uploads) for the chromium browser. I know that Chrome has this function, so I am hoping I can do this to in code.

Thanks!
ovidiuppp
Newbie
 
Posts: 2
Joined: Thu Mar 19, 2020 11:13 am

Re: Disable all file uploads

Postby magreenblatt » Thu Mar 19, 2020 11:53 am

In C++ you can implement CefDragHandler::OnDragEnter. You will need to check your C# wrapper documentation for a similar method.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Disable all file uploads

Postby ndesktop » Thu Mar 19, 2020 11:59 am

CefSharp::IDragHandler::OnDragEnter is the equivalent. Return true to prevent drag.
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: Disable all file uploads

Postby ovidiuppp » Fri Mar 20, 2020 6:56 am

ndesktop wrote:CefSharp::IDragHandler::OnDragEnter is the equivalent. Return true to prevent drag.


Thank you very much, it worked :D
ovidiuppp
Newbie
 
Posts: 2
Joined: Thu Mar 19, 2020 11:13 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 48 guests