title: Upload audio clip realtime while its recording?
body: <p>How to upload audio clip realtime to a server while its recording? Basically my requirement is upload an audio clip as chucks/packets while its recording.
  I already did the recording part with using IQAudioRecorderController <a href="https://github.com/hackiftekhar/IQAudioRecorderController">https://github.com/hackiftekhar/IQAudioRecorderController</a>. It records the audio and save to TemporaryDirectory. </p>
  
  <p>I wanted to know how to upload realtime without saving the audio clip.</p>
  
  <p>This is the recording part</p>
  
  <pre><code>//Unique recording URL
  
  
  NSString *fileName = [[NSProcessInfo processInfo] globallyUniqueString];
  _recordingFilePath = [NSTemporaryDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.m4a",fileName]];
  
  
  // Initiate and prepare the recorder
  
  _audioRecorder = [[AVAudioRecorder alloc] initWithURL:[NSURL fileURLWithPath:_recordingFilePath] settings:recordSetting error:nil];
  _audioRecorder.delegate = self;
  _audioRecorder.meteringEnabled = YES;
  
  
  // Recording start
  - (void)recordingButtonAction:(UIBarButtonItem *)item
  {
   if (_isRecording == NO)
    {
      _isRecording = YES;
  
      //UI Update
      {
          [self showNavigationButton:NO];
          _recordButton.tintColor = _recordingTintColor;
          _playButton.enabled = NO;
          _trashButton.enabled = NO;
      }
  
      /*
       Create the recorder
       */
      if ([[NSFileManager defaultManager] fileExistsAtPath:_recordingFilePath])
      {
          [[NSFileManager defaultManager] removeItemAtPath:_recordingFilePath error:nil];
      }
  
      _oldSessionCategory = [[AVAudioSession sharedInstance] category];
      [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryRecord error:nil];
      [_audioRecorder prepareToRecord];
      [_audioRecorder record];
  }
  else
  {
      _isRecording = NO;
  
      //UI Update
      {
          [self showNavigationButton:YES];
          _recordButton.tintColor = _normalTintColor;
          _playButton.enabled = YES;
          _trashButton.enabled = YES;
      }
  
      [_audioRecorder stop];
      [[AVAudioSession sharedInstance] setCategory:_oldSessionCategory error:nil];
  }
  }  
  
  // Recording done
  
  -(void)doneAction:(UIBarButtonItem*)item
  {
    if ([self.delegate respondsToSelector:@selector(audioRecorderController:didFinishWithAudioAtPath:)])
    {
        IQAudioRecorderController *controller = (IQAudioRecorderController*)[self navigationController];
        [self.delegate audioRecorderController:controller didFinishWithAudioAtPath:_recordingFilePath];
    }
  
    [self dismissViewControllerAnimated:YES completion:nil];
  }
  </code></pre>