使用“添加链接”限制 DotNetNuke 文本编辑器中的上传

发布于 2024-11-14 13:56:25 字数 306 浏览 4 评论 0原文

我正在构建 DotNetNuke 5.6 模块。该模块包含一个带有一些文本框的表单和 dotNetNuke 富文本编辑器。 用户应该填写此表格并将其保存到数据库中。 一切都运转良好。

但问题是,如果用户选择添加链接,则可以使用它将图像或文档上传到服务器。 这里的问题是:用户将文档上传到门户根目录,这将使其他用户可以看到它们。我们不希望发生这种情况,因为每个用户的文档都是私有的,其他用户不应该看到。

问题是: 我可以限制用户将文档上传到仅该用户可见的特定文件夹吗?这是为了防止不同用户看到彼此的私人文档? 或者 我可以完全限制用户上传文档吗?

谢谢

I am building a DotNetNuke 5.6 Module. The module contains a form with some textboxes and the dotNetNuke Rich text Editor.
Users are supposed to fill this form and it is saved to the database.
Everything is working just fine.

The problem though is that users can use it to upload images or documents to the server if they select to add a link.
The problem here is : Users will upload documents to the portal root which will make them visible to other users. We do not want this to happen as each user's documents are private and should not be visible by other users.

The question is:
Can I restrict users to upload documents to a specific folder visible only to that user? this is to prevent different users from seeing each other's private documents?
OR
Can I restrict users from uploading documents altogether?

Thanks

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

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

发布评论

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

评论(1

哀由 2024-11-21 13:56:25

文件夹安全设置可在“管理”-“文件管理器”中找到。写权限控制上传:

文件夹安全设置

允许的文件扩展名在主机设置-其他设置中。这是一项全局安全功能,默认情况下不包括常见的媒体文件扩展名:

Allowable File Extensions

另外,不同的 < HtmlEditorProviders 在其配置中确实有文件夹和上传设置。 HtmlEditorProviders 使用特定于提供程序的 web.config 属性和配置文件进行配置,这些属性和配置文件位于 /Providers/HtmlEditorProviders 下。

Telerik 提供程序具有 ImageManager.ViewPathsImageManager.UploadPathsImageManager.DeletePaths 属性,以及不同文件扩展名组(图像、媒体、文档、Flash、silverlight、模板)。 Cute Editor 对基于角色的默认上传目录< /strong>,但我在 Telerik 提供商中找不到这些。

另请参阅:

如何上传DotNetNuke 中的受限文件类型

Folder security settings are found in the Admin - File manager. Write permissions control upload:

Folder security settings

Allowable File Extensions are in the Host Settings - Other Settings. This is a global security feature, and does not include common media file extensions by default:

Allowable File Extensions

In addition, different HtmlEditorProviders do have folder and upload settings in their configuration. HtmlEditorProviders are configured with provider-specific web.config properties and configuration files that are found under /Providers/HtmlEditorProviders.

Telerik provider has ImageManager.ViewPaths, ImageManager.UploadPaths and ImageManager.DeletePaths properties, and also maximum upload sizes for different file extension groups (image, media, document, flash, silverlight, template ). Cute Editor has some support for role-based default upload directories, but I couldn't find these in the Telerik provider.

See also:

How to Upload Restricted File Types in DotNetNuke

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