简体   繁体   English

如何使用JavaScript从共享文件夹访问pdf文件

[英]How to access pdf file from a shared folder using javascript

I have one folder " PDFStore " shared with EVERYONE in my machine. 我有一个文件夹“PDFStore”在我的机器上每个人共享。

The code base is present in another remote machine. 代码库位于另一台远程计算机中。

I want to access the PDF file present within the folder PDFStore through Javascript from the remote machine. 我想通过Javascript从远程计算机访问文件夹PDFStore中存在的PDF文件。

so that i can open the PDF file in a new tab using Window.open() to fulfill my requirement. 这样我就可以使用Window.open()在新选项卡中打开PDF文件来满足我的要求。

When giving the path as the network path of the file, it is showing the error "Access denied" . 将路径指定为文件的网络路径时,将显示错误“访问被拒绝”

Please suggest how can i access the file? 请提出如何访问该文件的建议?

I think, you can do this by providing the ip address of your local machine. 我认为,您可以通过提供本地计算机的IP地址来实现。

You may try with the following path 您可以尝试以下路径

"your_ip/the_alias_name_of_the_application/the_mapping_shared_folder"

The alias name would do the trick if hosted in IIS server. 如果托管在IIS服务器中,则别名将可以解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM