开发者

File manager with auto-renaming of files and strict validation

I'm looking to d开发者_如何转开发evelop 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜