ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Easy method for dynamic file upload path?

December 06, 2011 4:35am

Subscribe [2]
  • #1 / Dec 06, 2011 4:35am

    pixelbaker

    17 posts

    Hi, I’m working on a project turning a big photo gallery to EE.

    There is a concern about the file upload path. In File Manager I can only define one static path for file upload. I can imagine there will be tons of photos uploaded to this path. It will be harder to manage and the site performance may be affected.

    I wonder if there is a solution to create and setup sub folders automatically when uploading, either by year/month, or by member id(better).

    I researched on the forum and the web, but only found some methods:
    1.http://devot-ee.com/add-ons/dm-eeck
    The add-on could separate uploads by year/month, but looks a bit overkill if I only want this function only and don’t need CK editor.
    2.http://devot-ee.com/add-ons/upload-rights
    Allow sub folders, but need manual setting.

    Is there any other solution? Can anybody shed some light?

    Thanks!

  • #2 / Dec 06, 2011 10:41am

    pixelbaker

    17 posts

    Just found dm-eeck is not suitable for the case.

    Just found this post and still no luck.
    http://stackoverflow.com/questions/6285890/expressionengine-saef-file-upload-to-specific-directoy

    Isn’t there any solution to allow specifying upload folders dynamically, but not the only static one in control panel?

  • #3 / Dec 06, 2011 2:55pm

    pixelbaker

    17 posts

    Aha, I figured it out!

    For year-month dynamic path, just create such fields say 2011-12,2012-1 in file fields and such folders in server. Then, in member upload template, call these fields by a embeded code.(http://ellislab.com/forums/viewthread/155465/).

    If making year-month is too busy, maybe organizing by year is okay.

    Not fully dynamic but it should get things done.

    Why am I so smart:)

  • #4 / Dec 07, 2011 3:20am

    John Henry Donovan

    12339 posts

    Nice lateral thinking 😊 There is also an addon called Assets which does sub-folders but would not be dynamic as such. Feel free to start a new thread if you have any more questions.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases