将文件从两个不同的应用程序上传到同一文件夹

发布于 2025-01-05 18:31:45 字数 149 浏览 0 评论 0原文

是否可以从同一文件夹中的不同 Web 应用程序上传文件。 应用程序A对应一个注册页面,应用程序B管理员可以跟踪应用程序A中注册的每个人。 问题是应用程序 B 的管理员无法看到应用程序 A 中上传的文档,因为它们上传到不同的文件夹中。 如何将应用A上传的文件保存到应用B的de文件夹中?

Is it possible to upload files from different web applications in a same folder.
Application A corresponds to a register page, and application B administrator can track every person is register in application A.
The problem is that administrator of app B cannot see the documents uploaded in app A since they where uploaded in a different folder.
How can I save the uploaded files of app A into de folder of app B.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

魔法少女 2025-01-12 18:31:45

通常的方法是在两个应用程序之外有一个他们都可以看到的公共文件夹。在 IIS 内部,您可以将其设置为每个应用程序中的虚拟目录。

从应用程序的角度来看,该文件夹似乎位于其根路径的本地。但是,它物理存储在其他地方。

步骤

  1. 转至网络服务器上的文件系统。
  2. 在某处创建一个目录来保存您的上传内容。授予您的应用程序池在该目录中读取和写入文件的权限。
  3. 在 Web 服务器上打开 IIS 管理器。
  4. 导航到应用程序 A。
  5. 右键单击该站点并选择“添加虚拟目录”
  6. 为其输入别名,并将路径设置为您在步骤 2 中创建的目录。
  7. 对应用程序 B 执行步骤 4,5 和 6。

从应用程序 A 中,更改您的虚拟目录。代码将文件保存到该目录。从应用程序 B 更改代码以从该目录中提取文件。

The usual way of doing this is to have a common folder outside of both applications that they can both see. Inside of IIS you set this up as a virtual directory in each application.

From the applications perspective, it looks like the folder is local to it's root path. However, it's physically stored elsewhere.

Steps

  1. Go to the file system on your web server.
  2. Create a directory somewhere to hold your uploads. Give your app pool rights to read and write files to that directory.
  3. Open IIS Manager on the web server.
  4. Navigate to Application A.
  5. Right click on the site and select Add Virtual Directory
  6. Enter an alias for it and set the path to the directory you created in step 2.
  7. Do steps 4,5 and 6 for Application B.

From Application A, change your code to save your files to that directory. From Application B change the code to pull the files from that directory.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文