file-uri

Call a JavaScript function defined in an iframe in Chrome using the file protocol

冷暖自知 提交于 2019-12-21 20:22:27
问题 This question is extremely similar to the fully-updated version of the question asked here: How to call a JavaScript function from one frame to another in Chrome/Webkit with file protocol — unfortunately, that question was never actually answered. I have an HTML page that contains an SVG image in an iframe. The SVG exports a JavaScript API that allows it to do useful things (reset to zoomed and centered, display at "actual size"). Below the iframe, I've put buttons that the user can click on

How to use file protocol to access a directory on local system?

五迷三道 提交于 2019-12-21 04:28:12
问题 like /usr/local ? I tried file:///usr/local but failed [root@www2 robot]# cd file:///usr/local -bash: cd: file:///usr/local: No such file or directory 回答1: If you have a requirement to be able to access generic URLs from your shell, try using curl as a replacement for your cat: curl file:///path/to/file.txt curl http://www.domain.com/file.txt But as other posters have pointed out, the shell itself doesn't understand URLs. 回答2: If you have to deal with file:///usr/local on the command line,

How to convert Windows path to file: URL, in a batch file, suitable for SVN command line use

人走茶凉 提交于 2019-12-19 09:03:19
问题 In a Windows-based SVN installation (using CollabNet Subversion Edge), I have a post-commit hook batch file where I construct a repository folder name, and I need to call svnsync with a file: URL pointing to that Windows folder. The question now is: How can I convert a Windows folder or file name to a file: URL, in such a way that that URL is at least acceptable for the SVN command line tools? 回答1: In a batch file, if the variable FILE_OR_FOLDER_NAME contains the (absolute or relative, local

How do you get the File:// protocol to work in IE8?

血红的双手。 提交于 2019-12-13 01:23:23
问题 I am running a website on my local machine ("http://localhost/asdf") and trying to get some file:// protocol links to work. In reality I'm trying to open a folder, not a specific file, but I can't get either to work. I've put localhost in my "trusted zone", I've tried every combo of "file" ,":", some number of "/" and then a whole bunch of different paths, but encoded and not encoded. Nothing I do causes anything to open when I click on the link. If I copy the link destination, and paste that

Why does curl allow use of the file URL scheme, but not wget

一笑奈何 提交于 2019-12-12 10:36:17
问题 This question refers to curl 7.21.4 and GNU Wget 1.13.4, I don't know if the answer is version specific. Using the file URI scheme I can get local file using curl as such $ curl file://localhost/Users/dave/.vimrc contents of .vimrc However if I try the same using wget I receive an error: $ wget file://localhost/Users/dave/.vimrc file://localhost/Users/dave/.vimrc: Unsupported scheme `file' Does anyone know why this is the case? 回答1: Because Wget has not been written to support file:// URLs.

Android N FileUriExposedException

寵の児 提交于 2019-12-11 05:13:37
问题 Guys My app uses the stock camera to take a picture I use the following code to take a picture public void takepic(View view) { TextView schtitle = (TextView) findViewById(R.id.Sitename); String schname = schtitle.getText().toString(); String[] tokens = schname.split(" "); String timeStamp = new SimpleDateFormat("dd-MM-yyyy-HH-mm-ss").format(new Date()); String imageFileName = tokens[0] + "-" + timeStamp + ".jpg"; TextView myAwesomeTextView = (TextView)findViewById(R.id.filetext); //in your

How enable file-protocol in google chrome frame plugin for IE

*爱你&永不变心* 提交于 2019-12-07 14:04:48
问题 I want to open an Html5 page in IE with chrome frame. But only http protocol supported and I can't open a html file from disk. 回答1: in registery path HKCU\Software\Google\ChromeFrame add this key : AllowUnsafeURLs=1 (DWORD) By adding the gcf: prefix to the URL in address bar, the page will load rendered with WebKit/V8 add this key : IsDefaultRenderer=1 (DWORD) Makes WebKit/V8 the default rendering technique sample gcf:c:\test.html 来源: https://stackoverflow.com/questions/9374500/how-enable

making json/jsonp xhr requests on the file: protocol

别等时光非礼了梦想. 提交于 2019-12-06 07:18:35
问题 I'm writing a javascript app that will be hosted on a file: protocol (ie: the application is just a folder of html, css, and javascript sitting someplace on my hard drive). When I try normal XHR requests they fail because of the same origin policy afaict. So my question is this, what's the best way to request json/jsonp files with an app as described above? Note: So far I've got all of my jsonp files using a hard-coded callback functions, but I'd like to be able to use dynamic callback

How enable file-protocol in google chrome frame plugin for IE

筅森魡賤 提交于 2019-12-05 23:21:27
I want to open an Html5 page in IE with chrome frame. But only http protocol supported and I can't open a html file from disk. in registery path HKCU\Software\Google\ChromeFrame add this key : AllowUnsafeURLs=1 (DWORD) By adding the gcf: prefix to the URL in address bar, the page will load rendered with WebKit/V8 add this key : IsDefaultRenderer=1 (DWORD) Makes WebKit/V8 the default rendering technique sample gcf:c:\test.html 来源: https://stackoverflow.com/questions/9374500/how-enable-file-protocol-in-google-chrome-frame-plugin-for-ie

Call a JavaScript function defined in an iframe in Chrome using the file protocol

淺唱寂寞╮ 提交于 2019-12-04 14:47:31
This question is extremely similar to the fully-updated version of the question asked here: How to call a JavaScript function from one frame to another in Chrome/Webkit with file protocol — unfortunately, that question was never actually answered. I have an HTML page that contains an SVG image in an iframe. The SVG exports a JavaScript API that allows it to do useful things (reset to zoomed and centered, display at "actual size"). Below the iframe, I've put buttons that the user can click on that call through to the functions defined in the SVG. My code looks like this: function reset() {