You should be able to change the upload directory for uploads to be https://example.com/uploads/advert/file.png instead of https://example.com/uploads/2019/05/20/file.png by adding the code below in your theme functions.php file
function wpse_16722_type_upload_dir( $args ) {
// Get the current post_id
$id = ( isset( $_REQUEST['post_id'] ) ? $_REQUEST['post_id'] : '' );
if( is_numeric( $id ) ) {
// Set the new path depends on current post_type
$newdir = '/' . get_post_type( $id );
$args['path'] = str_replace( $args['subdir'], '', $args['path'] ); //remove default subdir
$args['url'] = str_replace( $args['subdir'], '', $args['url'] );
$args['subdir'] = $newdir;
$args['path'] .= $newdir;
$args['url'] .= $newdir;
} else if( $id === "false" && isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'adverts_gallery_upload' ) {
$newdir = '/advert';
$args['subdir'] = $newdir;
$args['path'] .= $newdir;
$args['url'] .= $newdir;
}
return $args;
}
add_filter( 'upload_dir', 'wpse_16722_type_upload_dir' );
Few notes the code is based on this thread on StackExchange https://wordpress.stackexchange.com/questions/76895/different-upload-directory-based-on-post-type-in-a-theme, it will change the upload directory for pages, posts and any custom post type if you want this to affect only WPAdverts you need to customize it.
One way to do that would be to replace is_numeric( $id )
with get_post_type( $id ) === "advert"