file-uri

Use character # in URL inside file name

陌路散爱 提交于 2021-02-04 17:28:09
问题 I need to put a link with this href="file://attachments/aaaa_#_aaaa.msg" Obviously in that way is not working because the hash character # is used for anchors. So I try to change this to: href="file://attachments/aaaa_%23_aaaa.msg" but when I open the url in the IE, the browser is trying to open this: href="file://attachments/aaaa_%2523_aaaa.msg" IE is encoding the % character to %25 How can I put the file name in the URL to encode and read the hash character # in all the browsers to download

Use character # in URL inside file name

爱⌒轻易说出口 提交于 2021-02-04 17:28:05
问题 I need to put a link with this href="file://attachments/aaaa_#_aaaa.msg" Obviously in that way is not working because the hash character # is used for anchors. So I try to change this to: href="file://attachments/aaaa_%23_aaaa.msg" but when I open the url in the IE, the browser is trying to open this: href="file://attachments/aaaa_%2523_aaaa.msg" IE is encoding the % character to %25 How can I put the file name in the URL to encode and read the hash character # in all the browsers to download

Read file:// URLs in IE XMLHttpRequest

梦想的初衷 提交于 2020-01-19 11:12:26
问题 I'm developing a JavaScript application that's meant to be run either from a web server (over http) or from the file system (on a file:// URL). As part of this code, I need to use XMLHttpRequest to load files in the same directory as the page and in subdirectories of the page. This code works fine ("PASS") when executed on a web server, but doesn't work ("FAIL") in Internet Explorer 8 when run off the file system: <html><head> <script> window.onload = function() { var xhr = new XMLHttpRequest

Read file:// URLs in IE XMLHttpRequest

孤人 提交于 2020-01-19 11:12:18
问题 I'm developing a JavaScript application that's meant to be run either from a web server (over http) or from the file system (on a file:// URL). As part of this code, I need to use XMLHttpRequest to load files in the same directory as the page and in subdirectories of the page. This code works fine ("PASS") when executed on a web server, but doesn't work ("FAIL") in Internet Explorer 8 when run off the file system: <html><head> <script> window.onload = function() { var xhr = new XMLHttpRequest

Local file protocol for java.net.URL

☆樱花仙子☆ 提交于 2020-01-09 07:55:33
问题 What's the protocol for local files using URL? I've downloaded a file using Java and I need to know how to access it, not using File, but using URL. 回答1: Unix file://localhost/<path> file:///<path> Windows file://localhost/<drive>|/<path> file:///<drive>|/<path> file://localhost/<drive>:/<path> file:///<drive>:/<path> For more information see the related Wikipedia article. 回答2: You may use file:/// and file path. For e.g. file:///c:/temp.txt 来源: https://stackoverflow.com/questions/8406025

File Uri Scheme and Relative Files

我的梦境 提交于 2019-12-28 04:59:08
问题 Assume that the scheme for a uri is "file". Also assume that the path starts with '.' An example path is './.bashrc'. How would the fulluri look? 'file://./.bashrc' appears odd to me. 回答1: In short, a file URL takes the form of: file://localhost/absolute/path/to/file [ok] or you can omit the host (but not the slash): file:///absolute/path/to/file [ok] but not this: file://file_at_current_dir [no way] nor this: file://./file_at_current_dir [no way] I just confirmed that via Python's urllib2

How to call a JavaScript function from one frame to another in Chrome/Webkit with file protocol

时光总嘲笑我的痴心妄想 提交于 2019-12-24 06:13:19
问题 I have developed an application that has a list of items in one frame; when one clicks on an item it does something in another frame (loads an image). This used to work fine in all browsers, including Chrome 3; now it still works fine in Firefox but in recent versions of Chrome (I believe since 4) it throws this error: Unsafe JavaScript attempt to access frame with URL (...) from frame with URL (...). Domains, protocols and ports must match. This is obviously a security "feature" but is it

How to call a JavaScript function from one frame to another in Chrome/Webkit with file protocol

别说谁变了你拦得住时间么 提交于 2019-12-24 06:12:49
问题 I have developed an application that has a list of items in one frame; when one clicks on an item it does something in another frame (loads an image). This used to work fine in all browsers, including Chrome 3; now it still works fine in Firefox but in recent versions of Chrome (I believe since 4) it throws this error: Unsafe JavaScript attempt to access frame with URL (...) from frame with URL (...). Domains, protocols and ports must match. This is obviously a security "feature" but is it

error - java.lang.IllegalArgumentException: URI scheme is not “file”?

坚强是说给别人听的谎言 提交于 2019-12-23 13:09:48
问题 I am receiving the following error when trying to access font file : 011.08.31 12:12:42.704 ERROR [PDFOutputHandler] - Unable to resolve Unicode font java.lang.IllegalArgumentException: URI scheme is not "file" at java.io.File.<init>(File.java:366) at com.xx.reports.output.handler.PDFOutputHandler.addUnicodeFont(PDFOutputHandler.java:393) at com.xx.reports.output.handler.PDFOutputHandler.renderOutput(PDFOutputHandler.java:104) at com.xx.reports.output.handler.PDFOutputHandler.renderOutput

Does ExternalInterface work on the file: protocol?

放肆的年华 提交于 2019-12-22 04:38:10
问题 Can anyone confirm that ExternalInterface works on the file: protocol, or point to some docs that say that it will not? 回答1: It's starting to look like this will not work.. this page says: Scripting in either direction between local HTML files and local SWF files--for example, using the ExternalInterface class--requires that both the HTML file and SWF file involved be in the local-trusted sandbox. This is because the local security models for browsers differ from the Flash Player local