使用户能够修改应用程序存储的文档

发布于 2024-08-16 10:19:36 字数 307 浏览 5 评论 0原文


我们有以下场景:
* .NET 应用程序允许用户上传文档。
* 文档存储在文件系统中,当前用户无法访问。路径基本上是 \year\month\day\filename.ext
* 路径和文件名存储在数据库(MS SQL200)中,该数据库用于将文档链接到系统中的各种记录

问题:
如何实施以下情况:
我们维护文件和记录之间的链接
我们允许用户修改文件并轻松访问它们
我们防止文件和数据库不同步的情况。
它必须尽可能用户友好(例如,没有“下载文件,修改并再次上传”)
感谢您提供任何提示和方向指示 马泰杰

we have the following scenario:

* a .NET application allows users to upload documents.

* the documents are stored in a filesystem, currently inaccessible to users. the path is basically \year\month\day\filename.ext

* the path and filename are stored in a database (MS SQL200) that is used to link the documents to various records in the system

the question:

how to implement a situation where:

we maintain the link between the files and the records

we allow users to modify the files and to access them easily

we prevent situations where the files and the db would become unsynchronized.

it has to be as user friendly as possible (e.g. no "download the file, modify and upload it again")

Thanks for any hints and pointers to a direction
Matej

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

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

发布评论

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

评论(2

贱贱哒 2024-08-23 10:19:36

在重新发明轮子之前,您是否考虑过 SharePoint

Before you reinvent the wheel, have you considered SharePoint?

面如桃花 2024-08-23 10:19:36

正如 Andrew 所说(+1),您应该考虑 Sharepoint。那将是我的第一个选择。

如果您仍然需要从头开始,您的文件系统文件夹将需要将其 ACL 权限限制为由您的应用程序(可能是您的应用程序池用户)控制的唯一用户。仅允许该用户操作该文档。或者您可以考虑将它们存储在数据库中,就像 Sharepoint 一样。

您需要处理用户在同一天上传同名文件的情况。

要下载它们,您可以从实现 IHttpAsyncHandler 开始;它一开始很琐碎,但很容易变得复杂。

As Andrew said (+1), you should to consider Sharepoint. That would be my first option.

If you still need to do it from scratch, your filesystem folder will need to have their ACL permissions restricted for a unique user, controlled by your application (maybe your application pool user). This user, and only this, is allowed to manipulate that documents. Or you can consider to store them in your database, just like Sharepoint does.

You'll need to deal with users uploading files with same name in same day.

To download them, you can start by implementing a IHttpAsyncHandler; it's starts trivial, but get complicated very easily.

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