Title: Attachments on multisite installations fix
Last modified: August 31, 2016

---

# Attachments on multisite installations fix

 *  [olo ono](https://wordpress.org/support/users/ocouno/)
 * (@ocouno)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/attachments-on-multisite-installations-fix/)
 * Just a heads up attachments don’t work on multi-site installations I have had
   to modify your plug-in locally to get it to work. Seems to be down to line **#
   287 in the application-form.php** file. I changed this:
 *     ```
       $wpbb_attachments = array( WP_CONTENT_DIR . '/uploads' . $wpbb_wp_upload_dir[ 'subdir' ] . '/' . basename( $wpbb_moved_file[ 'file' ] ) );
       ```
   
 * To this:
 *     ```
       $wpbb_attachments = array( $wpbb_wp_upload_dir[ 'path' ] . '/' . basename( $wpbb_moved_file[ 'file' ] ) );
       ```
   
 * [https://wordpress.org/plugins/wpbroadbean/](https://wordpress.org/plugins/wpbroadbean/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Mark Wilkinson](https://wordpress.org/support/users/wpmarkuk/)
 * (@wpmarkuk)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/attachments-on-multisite-installations-fix/#post-7218381)
 * Thanks for the heads-up there. Does you code also work on a single WordPress 
   install?
 *  Thread Starter [olo ono](https://wordpress.org/support/users/ocouno/)
 * (@ocouno)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/attachments-on-multisite-installations-fix/#post-7218419)
 * Haven’t actually tested it… but it should do ‘[wp_upload_dir](https://developer.wordpress.org/reference/functions/wp_upload_dir/)‘
   will always return the upload folder path.
 * > On success, the returned array will have many indices: ‘path’ – base directory
   > and sub directory or full path to upload directory. ‘url’ – base url and sub
   > directory or absolute URL to upload directory. ‘subdir’ – sub directory if 
   > uploads use year/month folders option is on. ‘basedir’ – path without subdir.‘
   > baseurl’ – URL path without subdir. ‘error’ – set to false.
 *  Plugin Author [Mark Wilkinson](https://wordpress.org/support/users/wpmarkuk/)
 * (@wpmarkuk)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/attachments-on-multisite-installations-fix/#post-7218461)
 * If you could test it that would be great please. If it is a fix, if you could
   add as an issue on Github I can then action it asap. Thanks.
 * [https://github.com/highrisedigital/wpbroadbean](https://github.com/highrisedigital/wpbroadbean)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Attachments on multisite installations fix’ is closed to new replies.

 * ![](https://ps.w.org/wpbroadbean/assets/icon-256x256.png?rev=2046685)
 * [WP Broadbean](https://wordpress.org/plugins/wpbroadbean/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpbroadbean/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpbroadbean/)
 * [Active Topics](https://wordpress.org/support/plugin/wpbroadbean/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpbroadbean/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpbroadbean/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Mark Wilkinson](https://wordpress.org/support/users/wpmarkuk/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/attachments-on-multisite-installations-fix/#post-7218461)
 * Status: not resolved