Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm using Drupal 7. Perhaps I'm just not seeing the configuration but I don't see how to set a path for the upload when using the "+Add file" feature which means all assets loaded this way will end up in the root directory.
Am I missing something here? Should I install another module that takes care of this issue or is it just something not yet addressed?
Comments
Comment #1
Reg CreditAttribution: Reg commentedComment #2
tsvenson CreditAttribution: tsvenson commentedYou do that in the "File directory" setting in the "Edit" tab for the field.
Note that currently this does not affect files added using the WYSIWYG pluging, only fields.
Comment #3
Reg CreditAttribution: Reg commentedThanks for your speedy reply but I am still lost. I have never found a "File directory" setting for media so where is it? I would have thought there would be a link called "media" under admin/config/media but there is no "media" link under the "media" category to set anything.
Could you give me the path where this setting is?
Comment #4
tsvenson CreditAttribution: tsvenson commentedCurrently you can set the "File directory" path individually for each field you create to for example a content type. There is no global setting for this.
If you add a field of the type File or Image to your content type, you will find this setting on the Edit tab for that field. Its preferable to use the File field type as our goal is deprecate the Image field type at some stage in the future.
Comment #5
Reg CreditAttribution: Reg commentedThanks, that's how I saw it and I am fully aware of using the fields and File directory settings in them.
What I was asking about is that at admin/content/media which is the media tab under content. There is a "+Add file" link that seems to have no way to set the path if you use it. Is that correct or is there some additional module I can use to make it more flexible?
If that is correct then I think I'll just not use it since I like to have some control over my file structure.
I'm also guessing that if that's never been addressed then its something perhaps in the future will be removed?
Thanks, I'm just trying to get a handle on the purpose/use of this one link in the media module.
Comment #6
tsvenson CreditAttribution: tsvenson commentedAhh, now I get it.
At the moment there is no such possibility. Also, there are some very big changes coming to the File Entity module that is going to affect this. Especially #1292382: Make it possible to create any number of custom File Types will mean a new approach.
I'm currently looking into these things and hope to be able to come up with a proposal soon on how this can be done to not only have a great out-of-the-box solution, but also give you as a site builder the flexibility you have grown custom to in Drupal.
Comment #7
Reg CreditAttribution: Reg commentedThanks!
Comment #8
Reg CreditAttribution: Reg commentedI read through what they are doing with file types. When it comes to your redesign something to think about is that it would be nice if the media module would support organizing by "asset type" like a lot of website software does.
I.e.: automatically facilitating a hierarchy like:
or from what I read:
might be more how it turns out. Any, just my two cents worth.
Comment #10
dercheffeThe mentioned problem in #6 with the File Entity module seems to be fixed now. Because the issue with the upload folder in media module still exists, I'll reactivate this bug here again.
Comment #11
dercheffeComment #12
ParisLiakos CreditAttribution: ParisLiakos commentedthis belongs to file_entity now
Comment #13
gmclelland CreditAttribution: gmclelland commentedHaven't tried it yet, but you might want to try http://drupal.org/project/fe_paths to organize your files into folders.
Comment #14
Dave ReidI think this is covered by either #1997208: Specify a fixed custom file directory for use with the /file/add form or #2000934: Allow selection of which folder a file is to on the file/add form.