media_handle_upload( ... )

Saves a file submitted from a POST request and create an attachment post for it.

Parameters:
  • $file_id string
  • $post_id int
  • $post_data array
  • $overrides array