Change WP uploads directory in Bedrock

Hello,

I’d like to change the uploads directory of a Bedrock project from web/app/uploads/ to web/app/uploads/dist.

What would be the best way to do it that is in line with Bedrock philosophy?

I’ve tried adding this directive to application.php:
define('UPLOADS', CONTENT_DIR . '/uploads/dist');
This would not work. The directory that the server reads is then:

http://example.com/wp//app/uploads/dist/2015/08/caramel-Koala-350x350.jpg

Also, as a side question, would it be possible to change the uploads of user-submitted media files to web/app/uploads/dist while having other plugins drop their files in the usual web/app/uploads/.

I’m think here about plugins such as js_compose, reduic, woocommerce that use the UPLOADS directory to store different assets other than images.

Thanks!

This would be beyond the scope of what Bedrock does. Bedrock simply changes what is essentially wp-content to app, and in doing so keeps it outside of the wp folder.

Filtering where uploads go depending on where they come from would be a rather large task, as I assume most well written plugins would be using something like wp_handle_upload, if not using the WP media uploader itself.

I guess the probelm is that the UPLOADS constant that WordPress gives for our disposal is always relative to WP_SITEURL, and since this constant is <domain>/wp/ in Bedrock, trying to set UPLOADS will always result in incorrect uploads paths. Anyways, thanks for help @kalenjohnson!