Using a directory outside of the files directory is limiting because it prevents those files from being being directly available to imce. Perhaps you are planning to make those files available programatically, but it seems that it would be much simpler, and more stable, to allow us to choose the main directory for media. This could be a simple admin setting. I like how Imce recognizes folders and their contents that are uploaded through ftp. It is much easier to keep up with media if you can organize the folder system however you want.
Comments
Comment #1
rhys commentedI'll be adding the ability to get files from an FTP area, but the directory outside of the files directory is really to provide actual privacy of files for those that need it. There is a setting with the admin/settings/media/settings called "Public Original" that will place the original file uploaded into the files directory. However, the system is also dealing with generated derivatives, which can very much clutter the listing for people.
I was planning to have an easy way to do folder management through javascript, something like a windows explorer style. However, my javascript programming is a little limited, so I haven't completed that yet.
However, if you'd like to expand a little on what you are looking for, such as access to uploaded FTP files, or direct access to files (including the generated ones), please let me know. This module handles a lot more than simply images, and will eventually handle quite a few different types, such as documents.
Comment #2
mattman commentedHere's some insight I'd like to contribute regarding private vs. public media files.
Using this module, I'd like to see the storage of uploaded media provide some pretty complex options.
By this, I mean associating an upload to have the option to upload based on the domain used in a multisite setup and also based on the user who uploaded it. Yes, this means FTP directory support as planned, but possibly more comprehensive than anticipated.
I would use this module in a multi-site setup. Having an admin setting of "Organize uploaded media by domain/sites" would prefix the domain name used in the sites directory.
Beyond this, the option to store based on user uid or uname would be great. This way, I could use the features of this module in a multi-site scenario.
Media would be stored as follows (drupal root relative)
files/example.com/user1/media
vs.
files/example.net/userA/media
Also, something that would be SUPER great for my personal situation/setup, is a hosted service which provides secure storage/delivery of video content.
../outside_drupal_root/domain.com/user_name/media
Where this is the ftp upload location of a given user. This is something I would love to contribute. I've already got some of the code done.
Comment #3
rhys commentedI really like this idea, and would be willing to place this into the system, especially if you already have somewhat the code done.
For each media that exists in the system there is a user id associated with it. It was designed to be able to have things such as user galleries, so I'm sure we should definitely look at multi-site support. (Although this is possible by specifying different public storage directories, for each of the different sites)
I'd love to look at the code you have. And again thanks for the idea.
Comment #4
PixelClever commentedI guess the gist of what I am concerned about is integration with existing modules. There are so many approaches to media and file handling in Drupal, it would be nice if there was a move towards unification of the existing modules rather than the creation of completely separate and redundant functionality. The reason for putting the media in the files directory is threefold. One these files could then be used by tinymce (for instance to imbed images into text) , second these files would be accessible directly through the browser if you wanted to link directly to them, and three because Drupal doesn't like to allow access to other directories as easily. Drupal was unable to create the media folder by itself, and it still came up with an error after I created it manually. Now I don't know if this is htaccess issue, or a server issue, but I have had the same problem with other modules that try to create directories in the main folder.
You may have been planning to create your own file management system, but wouldn't it be better to integrate with one of the existing file management systems like webfm or imce? These are already very powerful, and using them would avoid having sites that rely on two separate managers.
If there are questions of cluttering the files directory, maybe there is a way to place the derivatives in their own folder so that they don't get in the way. I wouldn't mind having a folder of files I didn't use directly if I was still able to access everything else through imce or webfm.
I know you have your own reasons for making this module, and you may not have the time to integrate it in the way I am talking about. I just wish that the Drupal community would unify all the media handling modules into one grand system. Otherwise we are left to pick and choose between the weaknesses and strengths of the multitude of separate programs.
Comment #5
rhys commentedThe idea with this module was definitely have it integrated with quite a few other modules.
The biggest problem I found with a lot of the current existing modules, is the lack of a planned API on which to build and develop the further potentiality of drupal.
This was the case with metadata, as well as the multiple different modules for video, audio and imaging. It didn't make any sense to me why these where all kept seperate, except that people may not want those features on their site.
I didn't originally have a plan to create my own file management system, this came out of the necessity to have an easy way to original the media, as well as being able to generate derivatives and so forth. Having tryed out webfm, I found it extremely useful, but given the huge emphasis on javascript, I think it very bad to rely on the users browser to do a lot of work (the JS was over 100k last time I checked). Even with caching, this really does place a large load on the users browser, and I wanted to be able to give users access to the filing system also, which was limited by the method that webfm used.
I've already done the TinyMCE integration, through the contributed module media_embed.. The instructions hopefully are clear enough to be able to install it.
There are multiple reasons for doing it in this way. Hopefully it ends up helping somebody else, since I'm doing this primarily for some sites that I manage.
Comment #6
rhys commentedThere are heavy modifications taking place to the module, but having re-read the initial issue, I may add later on a "Allow private files" checkbox, which would have some ramifications for things such as derivatives, etc.. but something I'd be willing to do.
Comment #7
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.