title: Upload Image from front-end and get its url
body: <p>hi i am upload file from front-end but now code get only image attachment id i want get image url. </p>
  
  <pre><code>   function agp_process_woofile($file, $post_id){
  
       if ($_FILES[$file]['error'] !== UPLOAD_ERR_OK) __return_false();
  
  
    require_once(ABSPATH . "wp-admin" . '/includes/image.php');
    require_once(ABSPATH . "wp-admin" . '/includes/file.php');
    require_once(ABSPATH . "wp-admin" . '/includes/media.php');
  
      $attachment_id = media_handle_upload($file, $post_id);
  
    add_post_meta($post_id, '_file_paths', $attachment_id);
  
    $attachment_data = array(
      'ID' =&gt; $attachment_id,
      'post_excerpt' =&gt; $caption
    );
  
    wp_update_post($attachment_data);
  
    return $attachment_id;
  
  } 
  </code></pre>
  
  <p>See attachment_id i want get url from this function and update that url to "_file_paths" post meta </p>