如何自动化/简化此内容提交场景?

发布于 2024-08-08 08:12:30 字数 320 浏览 4 评论 0原文

我正在尝试思考一种自动化或简化内容提交的策略。默认情况下,提交是通过表单完成的,并计为一个条目(一些文本字段+随机数量的文件上传字段)。通过网络界面,我可以将其想象为常规形式。但我如何才能自动化该过程以简化它呢?

我心中没有特定的解决方案,只是想知道大多数人认为在这种情况下最好的最合乎逻辑的方法是什么。我想到了文件夹提交,其中用户选择他想要提交的一个或多个文件夹的路径,然后系统会在内部分析内容并将它们分成多个条目或 1 个条目,然后根据需要填充尽可能多的条目就像通过网络表单完成一样。

对此有什么想法吗?这种方法会带来哪些挑战?是否有更好的方法来做到这一点?我希望我想要实现的目标有点清楚。

I'm trying to think a strategy to automate or simplify content submission. A submission is by default done through a form and counts as one entry (some text fields + a random number of file upload fields). Through a web interface, I can imagine this as a regular form. But how can I automate the process to simplify it?

I don't have a particular solution in mind, just wondering what are the most logical approaches that most people would agree are best in this case. I thought about folder submission where the user selects the paths of the one folder or many folders he wants to submit and the system would then internally analyze the content and break them into either multiple entries or 1 entry, and then populate as many entries as needed just as if it were done through a web form.

Any thoughts on this? What challenges should I expect with this approach and are there better approaches to doing this? I hope it's somewhat clear what I'm trying to accomplish.

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

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

发布评论

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

评论(1

¢蛋碎的人ぎ生 2024-08-15 08:12:30

一种方法是创建内容包规范(不必很复杂)。例如,它可以包含文件和 XML 文档,其中包含有关要发布的项目的所有信息。用户可以简单地上传contentBundle.zip

服务器会将存档解压缩到临时文件夹,然后解析其中包含的 XML 文件。然后,您可以确定已提交的项目数、验证其内容、提取与每个项目相关的文件,并采取一切必要措施将每个项目存储为单独的实体。 XML 可能如下所示:

<items>
    <item>
       <name>John Foo</name>
       <mobile>+111111111</mobile>
       <image>43.gif</image>
    </item>
    <item>
     ...
    </item>
</items>

现在您可以轻松确定已提交的“项目”数量并分隔存档的内容。

One way could be creating a content bundle specification (which does not have to be complicated). For example, it could contain files, and an XML document which contains all of the information on the items to be posted. The user could simple upload contentBundle.zip.

The server would decompress the archive to a temporary folder, then parse the contained XML file. You can then determine how many items have been submitted, validate their contents, pull out the files relevant to each item and do whatever is necessary to store each one as an separate entity. The XML might look like:

<items>
    <item>
       <name>John Foo</name>
       <mobile>+111111111</mobile>
       <image>43.gif</image>
    </item>
    <item>
     ...
    </item>
</items>

Now you can easily determine how many 'items' have been submitted and separate the contents of the archive.

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