wordpress media_handle_upload to work with blob or base64

you can do that with the function wp_handle_sideload
https://developer.wordpress.org/reference/functions/wp_handle_sideload/

Steps to make this :

  1. create a temporary file with the content you need
  2. pass this filename to function wp_handle_sideload

Leave a Comment