如何在Firefox中获取文件的完整路径 [英] How do i get the full path of the file in Firefox

查看:95
本文介绍了如何在Firefox中获取文件的完整路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用JavaScript在Firefox中获取文件的完整路径?

How do i get the full path of the file in Firefox with JavaScript?

提前致谢!

推荐答案

基本上,出于安全原因,你不能这样做。

Basically, you can't, for security reasons.

然而,新的/即将来临的文件API 允许您通过获取文件的完整路径来完成您可能想要做的所有事情,而无需给出你是文件的完整路径。您可以阅读该文件(是的,客户端),获取它的数据URI等。此处的其他问题在这里

However, the new/upcoming File API allows you to do just about everything you might want to do by getting the file's full path, without giving you the file's full path. You can read the file (yes, client-side), get a data-URI for it, etc. Example and details in this other question here on SO.

这篇关于如何在Firefox中获取文件的完整路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆