First off, thanks for everything on the module.
Second, I'd like to suggest creating a method to allow for a file, multiple files, and entire directories of files to be added to the Drupal database so they can be used in FileField_Sources through IMCE. FileField_Sources can't see or use files uploaded outside of the field or IMCE, and neither the File field nor IMCE is currently capable of uploading batches of files at a single time.
As Drupal evolves and websites built on it become more robust and media driven, and users have more media to upload and manage on sites, I think this could be a great asset to allow for users to manage files in a way that's time-efficient and how they're accustomed to doing it. In my case, I'm building a photography site where I'll send +50 files up at a time. Drupal's far better than most dedicated portfolio CMS sites I've seen in the way it allows for integrated multiple content types, and the reuse of files independent of attachment to content.
I imagine this can work as hack (like we saw in D6), an additional feature, an independent module or one that works with FileField_Sources or IMCE. User ufku suggested the idea that this could even be implemented within IMCE as a button, something like refresh.
I think the best way to accomplish this is like so:
- A method is created to check files in a directory for references in the database. Maybe it checks for unique FID.
- A single directory at a time could be checked to reduce system load
- An option could be included to check subdirectories of that directory as well
- Files that already exist in the database will be ignored
- Maybe something similar to this could also check to see if files are missing, and remove them from the system
- It could look only for files of specific types, using an editable list of extensions
These are just some of my ideas, and I'm sure there's all sorts of security stuff I haven't considered.
It looked like the Media module has a way of checking files in the database for their type to update them for use in that module, so maybe there's a clue in there about how to make this happen.
FileField_Sources Attach component comes close to achieving this, but the method for viewing the files is overwhelming, and its default behavior of copying files isn't so good for saving space on a server or managing the existing directory structure.
Comments
Comment #1
bluestarstudios commentedI agree. This would be great. The attaching of multiple files at once is definitely something that this module would benefit from. In fact I started a separate issue/feature request for that alone in the FTP attach part of FileField Sources here: #1280814: Allow attach of multiple files at once.
I hope we can get this subject moving sometime soon.
Comment #2
quicksketchI don't think anything described in this issue will be implemented in this module. Patches submitted I'll look at, but I'm not going to spend time making FileField Sources into anything this elaborate.
Comment #3
quicksketchComment #4
philippejadin commentedSorry to reopen this, but is there, to the knowledge of people here, a module that would add files to the file table from filesystem? That module would sync filesystem files to the files drupal table (at cron or using a UI).
I agree this has nothing to do with FileField Sources
Comment #5
BioALIEN commentedYou can drop your files via FTP and use IMCE FileField to pick up the files. You can follow the progress of getting this into FileField Sources here:
#436182: IMCE lists unusable files (The selected file could not be used because the file does not exist in the database)
#877452: Enable uploading and deletion through IMCE