--allow-file-access-from-files

Having problems with building or using the CefGlue .NET/Mono binding? Ask your questions here.

Moderator: fddima

--allow-file-access-from-files

Postby Desu » Sun Jul 28, 2013 3:57 pm

Hello,

I am trying to access file:// loaded iframes from a file:// loaded page with js. But then of course i am getting:
"Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match."

i tried adding --allow-file-access-from-files to CefArgs but it didnot change anything?
Am i doing this wrong or do i have to use a custom scheme either way?
Desu
Techie
 
Posts: 11
Joined: Mon Jun 24, 2013 3:05 pm

Re: --allow-file-access-from-files

Postby magreenblatt » Mon Jul 29, 2013 11:52 am

You probably need to use a custom scheme.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: --allow-file-access-from-files

Postby Desu » Fri Aug 02, 2013 11:00 am

Yes, Thanks for the reply, i am using a custom scheme now.
Desu
Techie
 
Posts: 11
Joined: Mon Jun 24, 2013 3:05 pm

Re: --allow-file-access-from-files

Postby dshaulov » Tue Aug 13, 2013 7:30 am

Adding the switch in OnBeforeCommandLineProcessing worked for us in normal cef, don't know about CefGlue.

Code: Select all
virtual void OnBeforeCommandLineProcessing( const CefString& process_type, CefRefPtr<CefCommandLine> command_line)
{
   command_line->AppendSwitch("allow-file-access-from-files");
}
dshaulov
Techie
 
Posts: 37
Joined: Sun Dec 09, 2012 10:58 am

Re: --allow-file-access-from-files

Postby fddima » Tue Aug 13, 2013 7:43 am

dshaulov wrote:Adding the switch in OnBeforeCommandLineProcessing worked for us in normal cef, don't know about CefGlue.

For CefGlue it is also will work. But in common case - better is using custom scheme.
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: --allow-file-access-from-files

Postby goldeneyes » Tue Sep 13, 2016 4:06 pm

Hello,

Sorry if I'm writing in the wrong Forum, but anybody know how to convert the command above to Delphi, I want to add the parameter of allow-file-access-from-files

Regards
goldeneyes
Newbie
 
Posts: 6
Joined: Tue Aug 30, 2016 2:14 am


Return to CefGlue Forum

Who is online

Users browsing this forum: No registered users and 15 guests