有什么方法(通过浏览器)无需打开对话框即可读取本地文件?
There is any way (from browser) to read local file without open dialog?
可以使用:javascript,flash或java.
Can be used: javascript, flash, or java.
目标:将带有MS Word中图像的文字粘贴到所见即所得中时,将有指向图像文件的链接.就像"file:///C:/Users/username/AppData/Local/Temp/msohtmlclip1/01/clip_image001.jpg".我想读取此文件,上传到服务器并替换本地路径.
Goal: when you paste text in WYSIWYG with images from MS Word, there will be links to image files. Like "file:///C:/Users/username/AppData/Local/Temp/msohtmlclip1/01/clip_image001.jpg". I want to read this files, upload to server and replace local path.
推荐答案在未经用户许可的情况下从浏览器访问磁盘内容存在安全风险.因此,要使用Java进行此操作,您需要对小程序进行签名并允许用户运行它.
Accessing the disk contents from the browser without the user permission is a security risk. As such, to do that with Java you need your applet signed and the user allowing it to run.
更多推荐
在不打开对话框的情况下读取本地文件(在浏览器中)
发布评论