WordPress: specify a custom upload folder for a plugin

I am using the Store file uploads for Contact Form 7 plugin to save photo uploads to the WordPress Media Library for a contest our business is running.

The default upload path is We will have hundreds of entries into the contest and we would like all entries to reside in instead.

This plugin seems to get the default path correctly:

// Get the path to the upload directory.
$wp_upload_dir = wp_upload_dir();

How do I proceed with making the uploads go to a custom folder from here? (sorry for the newb question!)


Spotify API Driven Music Web app, that allows to listen and control and share songs

Fake Firebase Performance for use during Flutter unit & widget tests