voxforge.org
VoxForge Dev

Changeset 9

Show
Ignore:
Timestamp:
04/10/07 23:35:36 (2 years ago)
Author:
jesse
Message:

Bumped timeout to 30 minutes for really big uploads and congested networks. Also, turned off curl's UPLOAD mode. Apparently it was keeping uploading from actually working. Go figure. Turned on curl's VERBOSE mode. Also, removed old cookie file before starting. I also added a new POST field. I'm not sure if it matters, but the test before this commit was the first to succeed!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/submit_audio.php

    r8 r9  
    1919  global $upload_url; 
    2020 
     21  set_time_limit(1800); // run for 30 minutes, max 
     22 
    2123  $session_dir = $argv[1]; 
    2224  $session_id  = basename($session_dir); 
     
    2527  if (count($argv) != 2) crash(1,"usage: submit_audio.php /path/to/audio/dir/to/submit"); 
    2628 
     29  exec("rm -f my_cookies.txt"); 
    2730  if (tar_gz($session_dir,$tar_gz_path) !== 0) crash(6,"ERROR: tar failed"); 
    2831   
     
    107110    'content'     => 'automated submission; see .tgz for details', 
    108111    'contentType' => 'text', 
     112    '__storageId_action' => 'upload', 
    109113    'storageId'   => "@$tar_gz_path", 
    110114    'subscribe'   => '1', 
     
    119123  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
    120124  curl_setopt($ch, CURLOPT_URL, $url); 
     125  curl_setopt($ch, CURLOPT_VERBOSE, 1); 
    121126  curl_setopt($ch, CURLOPT_POST, 1); 
    122   curl_setopt($ch, CURLOPT_UPLOAD, 1); 
    123127  curl_setopt($ch, CURLOPT_POSTFIELDS, $post_a); 
    124128  $result = curl_exec($ch);