Media Upload via URL issues

Hello, I’m attempting to implement an Aviary photo editor for images on my buddypress site. The editor plugin creates a new image that i am trying to upload to the current users account but without success. The new image doesnt show up and i dont see any detailed error message in the response. Could you show me what im doing wrong?

$nonce = RTMediaUploadView::upload_nonce_generator ( false,true );
$postURL = "";
$response = wp_remote_post($postURL,array('body'=>array(
  'files'=>array('filename'=>$tmp)// $tmp contains full file path on server


Hello @jdtower,

Try below code:

$nonce = RTMediaUploadView::upload_nonce_generator( false, false );
$postURL = "";
$response = wp_remote_post($postURL, array( 'body' => array(
  $nonce[ 'action' ] => $nonce[ 'nonce' ],
  'mode' => 'url_upload',
  'context' => 'bp_member',
  'url' => $filepath // absolute path to the media

Make sure you have set ‘Allow user to upload media via URL’ to ON.

Thank you.