The MU forums have moved to WordPress.org

Custom Upload ( Verification ) (4 posts)

  1. mccay_a
    Member
    Posted 14 years ago #

    In the previous release of wordpress mu, i made a custom hack as below, but i can not replicate in new version. Any help would be appreciated

    I found following line and changed location to my custom location
    ---------------------------------------------------------
    if( !defined( "UPLOADS" ) )
    define( "UPLOADS", "HOME/WP-CONTENT/UPLOADS/" );
    ---------------------------------------------------------

    In new release i changed the following line, but it does not work

    ----------------------------------------------------------------
    if( !defined( "UPLOADBLOGSDIR" ) )
    define( "UPLOADBLOGSDIR", "HOME/WP-CONTENT/UPLOADS/" );
    -----------------------------------------------------------------

    Any help would be appreciated

    Regards. Alan.

  2. gopalav
    Member
    Posted 14 years ago #

    Hi Alan,

    In the new version, it looks like WPMU is using a new variable "BLOGUPLOADDIR".

    Change the following:
    ----------------------------------------
    if( !defined( "BLOGUPLOADDIR" ) )
    define( "BLOGUPLOADDIR", "HOME/WP-CONTENT/UPLOADS/" );
    ------------------------------------------------------
    also it looks like the path needs to be absolute physical path for ex: c:\websites\home\wp-content\uploads though i;m not 100% sure.

    I'm working on separating blogs.dir folder and i could move it to the root folder by using the following:
    define( "BLOGUPLOADDIR", ABSPATH . "/blogs.dir/{$wpdb->blogid}/files/" );

    Thanks
    Venu

  3. mccay_a
    Member
    Posted 14 years ago #

    Sorry. Made this change, but i can not even find where the file uploads to.

    it does appear to upload, but not to a directory i know. Also it does not show up in post as link to download

    Any Thoughts

    Alan

  4. mccay_a
    Member
    Posted 14 years ago #

    ok, so i found the variable, but why does it break wordpress

    ---------------------------------------------------------------
    if ( !defined('WP_CONTENT_DIR') )
    define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
    ---------------------------------------------------------------
    changed to
    ---------------------------------------------------------------

    if ( !defined('WP_CONTENT_DIR') )
    define( 'WP_CONTENT_DIR', ABSPATH . 'Home/wp-content/uploads' );
    ---------------------------------------------------------------

    even with this, it break wordpress, no pages wil be displayed.

    config also needs following line to uplaod to correct directory

    -------------------------------------------------------------------
    if( !defined( "BLOGUPLOADDIR" ) )
    define( "BLOGUPLOADDIR", WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" );
    -------------------------------------------------------------------
    changed to
    -------------------------------------------------------------------
    if( !defined( "BLOGUPLOADDIR" ) )
    define( "BLOGUPLOADDIR", WP_CONTENT_DIR . "" );
    -------------------------------------------------------------------

    This works, puts files in correct folder

    so what am i doign wrong. i dont care of directory of posts, only attachments. I need them to be in single directory ( and yes i know the risks )

    Regards, Alan

About this Topic