in

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 www.site.com/wp-content/uploads. We will have hundreds of entries into the contest and we would like all entries to reside in www.site.com/wp-content/uploads/photo-contest 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!)



Source: https://stackoverflow.com/questions/70715768/wordpress-specify-a-custom-upload-folder-for-a-plugin

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