media_handle_upload $post_data how does it work

I´m trying to find out how to pass information through $post_data while doing the media handle upload. I can´t find documentation about it.

I have a Form with the Upload, where people fill in the title of the attachment and other custom fields.

Read More

Now i would like to pass this information with the media_handle_upload();

<?php media_handle_upload( $file_id, $post_id, $post_data, $overrides ); ?>

Can you tell me in which order i have to write in the array?

And am I missing out something else?

Thanks in Advance

Related posts

Leave a Reply

1 comment

  1. To get into the gritty details, currently $post_data is only used to merge with defaults:

    $attachment = array_merge( array(
        'post_mime_type' => $type,
        'guid' => $url,
        'post_parent' => $post_id,
        'post_title' => $title,
        'post_content' => $content,
    ), $post_data );