Browse file system, read file metadata of existing files/folder and save it to database using Editor

Browse file system, read file metadata of existing files/folder and save it to database using Editor

d00mboyd00mboy Posts: 10Questions: 5Answers: 0

I am working on an internal document management web application that runs against our internal NAS file system. The webserver hosting this app is the NAS server.

I would like to be able use something like the 'Browse' button in the Upload() field type so the user can select local files or a folder, read file metadata from the selected file(s) and then save that metadata to a database, without uploading the file.

This information would then be used in a datatable to create clickable URLS or UNC paths, alongside descriptive fields allowing filtering of the document database to only show documents relevant to the specific user.

I have done many things like this using file metadata bulk loaded from operating system script output, but I'm hoping for a way for users to do so interactively.

I assume this is something that would require a custom field type? Am I missing some reason this is impossible? Does anyone have any pointers on where to start assuming it is not?

Ted

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

Answers

  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin

    Hi Ted,

    That's a really nice idea. I think you could actually use the upload field type to do what you are looking for, in combination with the preUpload event. That is cancellable, so the file wouldn't get sent to the server, but the event does get information about the file (it even gets a handle to the file itself, so you could read it if needed). That information could then be used to populate other fields in the form. That might work for you?

    Allan

Sign In or Register to comment.