2020-05-02 / 5869阅 / 悠然
以与上载文件由media_handle_upload()处理相同的方式处理侧载文件。
(array)
(Required)
Array similar to a $_FILES upload array.
(int)
(Optional)
The post ID the media is associated with.
(string)
(Optional)
Description of the side-loaded file.
Default value: null
(array)
(Optional)
Post data to override.
Default value: array()
(int|WP_Error) The ID of the attachment or a WP_Error on failure.