具有自动重命名文件和严格验证功能的文件管理器
我正在寻找开发一个文件管理器,它有一些稍微不寻常的要求。这个想法是,经过身份验证的用户可以上传新文件,重新排序现有文件(通过拖放),以及删除 - 我知道这里没有什么新内容。然而,这些文件被用作媒体演示的一部分,并且有严格的排序和命名约定,所以我想我应该让他们上传任何名称的文件,然后即时重命名,此时我可以根据文件夹中已存在的内容确定名称应该是什么。基本上,所做的每个更改都会对文件夹中的所有文件名产生潜在的连锁反应。除此之外,我想设置一个版本控制系统,并可以选择回滚到以前的状态。
我可能倾向于 PHP 和 jQuery 解决方案,希望通过构建在已经存在的东西之上。有没有什么东西可能适合我在标准文件管理器流程之上添加额外的验证和处理?它不一定是 PHP,这个 Intranet 站点只会在少数具有相同规格的计算机上运行。可能可以通过Java或其他语言解决这个问题...
希望这不是太模糊,只是希望有人可能有文件管理器的经验,它可以与我要做的事情集成。
I'm looking to develop a file manager which has some slightly unusual requirements. The idea is that an authenticated user can upload new files, re-order existing ones (through drag and drop), and delete - nothing new here I know. However, the files are being used as part of a media presentation and have a strict ordering and naming convention, so I'd thought I'd let them upload files with any name, then do the renaming on the fly, at which point I can determine what the name should be, in line with what already exists in a folder. Basically, every change which is made has a potential knock on effect for all file names within a folder. Added to this, I want to set up a versioning system with the option to roll back to previous states.
I'm probably leaning towards a PHP and jQuery solution, hopefully by building on top of something which is already out there. Is there anything out there which is likely to work well with me adding extra validation and processing on top of standard file manager processes? It doesn't have to be PHP, this intranet site will only be running on a handful of machines with the same spec. Possibly there could be a solution to this via Java or another language...
Hope this isn't too vague, just hoping someone might have experience of a file manager which could integrate with what I'm going to have to do.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将使用类似堆栈的数据结构来保存编辑状态:
push -->向历史记录添加新操作(例如添加新幻灯片)
从堆栈中弹出一个元素 -->回滚到之前的更改
编辑结束时,用户按下
commit
按钮,PHP将读取堆栈,只有此时文件才会以正确的方式重命名I would use a stack like data structure to save the state of the editing:
push --> add new action to the history (eg new slide added)
pop an element out of the stack --> rollback to the previous change
At the end of the editing, the user press the
commit
button and the PHP will read the stack and only at this time the files will be renamed in the correct way