Exemplo n.º 1
0
 public function uploadImage($image)
 {
     if (!is_null($image)) {
         $result = $this->uploader->uploadFile($image);
         $longUrl = $result['url'];
         //initialize bitly
         $this->initBitly();
         //shorten url
         $this->shortUrl = $this->shortener->shortenUrl($longUrl);
     }
 }
Exemplo n.º 2
0
 /**
  * Shorten the file url
  * @param  string $longUrl 
  * @return string          the shortened url
  */
 public function shortenUrl($longUrl)
 {
     return $this->shortener->shortenUrl($longUrl);
 }