Example #1
0
 /**
  * Show a Twitpic-like response with the ID of the media file
  * and a (hopefully) shortened URL for it.
  *
  * @param File $upload  the uploaded file
  *
  * @return void
  */
 function showResponse($upload)
 {
     $this->initDocument();
     $this->elementStart('rsp', array('stat' => 'ok'));
     $this->element('mediaid', null, $upload->fileRecord->id);
     $this->element('mediaurl', null, $upload->shortUrl());
     $this->elementEnd('rsp');
     $this->endDocument();
 }