boonebgorges / buddypress-docs

GNU General Public License v3.0
106 stars 44 forks source link

Change Max File Size?? #666

Closed MarkRA312 closed 4 years ago

MarkRA312 commented 4 years ago

It only allows 2MB uploads. I have the wordpress backend media uploader set to 25MB. That didn't fix it.

How can I modify?

boonebgorges commented 4 years ago

Is it possible to upload files larger than 2MB at Dashboard > Media? It's possible that your server config doesn't allow for these large uploads (upload_max_filesize in php.ini, etc)

MarkRA312 commented 4 years ago

Well, while it's true that the default is 2MB, I changed the (upload_max_filesize) so that it accepts files up to 25MB. HOWEVER, that only changed the wordpress backend uploader (media). The BP Docs uploader still is limited to 2MB.

boonebgorges commented 4 years ago

When you say "still is limited to 2MB", can you provide exact details? Exactly what are you trying to do, and exactly what do you see? What do the error messages say, and where do they appear?

MarkRA312 commented 4 years ago

The plugin won't allow me to upload files larger than 2MB. (But I can do it everywhere else). If you try to, it says "[file name] exceeds the maximum upload size for this site."

See screenshots https://www.awesomescreenshot.com/image/4496966/7e355046f10346e78388d361b58153d6 http://tinyurl.com/wjmrduv

MarkRA312 commented 4 years ago

But like I said, my backend media uploader has a size limit of 25MB

boonebgorges commented 4 years ago

Thanks. Can you specify exactly where in the WP Dashboard you're changing the max upload size?

MarkRA312 commented 4 years ago

Yes, it's the php.ini file in the WP-Admin directory.

upload_max_filesize = 25M post_max_size = 25M memory_limit = 15M

boonebgorges commented 4 years ago

Assuming you're not running Multisite, WordPress gets this information directly from your PHP configuration: https://github.com/WordPress/wordpress-develop/blob/90a8a6adf6b055142a4575d6d5b0d1c52a13c822/src/wp-includes/media-template.php#L282 https://github.com/WordPress/wordpress-develop/blob/90a8a6adf6b055142a4575d6d5b0d1c52a13c822/src/wp-includes/media.php#L3192

Since you're seeing the higher limit in the Dashboard, we can assume that your PHP config settings are correct (though note that the wp-admin directory is not the place for php.ini).

So the remaining explanation is that something is modifying the available upload space on the front end, probably using the upload_size_limit filter. BuddyPress Docs does not do this. It's possible you're running another plugin that does - a quick search on a couple of local WP installs suggests that a few popular plugins do so (buddydrive, wp-user-avatars, ultimate-branding-files - see https://github.com/search?q=add_filter+%22%27upload_size_limit%27%22&type=Code for a rough search). You might want to check whether you're using a plugin that does this.

MarkRA312 commented 4 years ago

I see. Okay I'll take a look. Thanks for helping!