/**
  * Execute the command.
  *
  * @return void
  */
 public function handle(Cloud $cloud)
 {
     $listing_image_upload = $cloud->put($this->uplodadsDir . $this->resizedImageName, Image::make($cloud->get($this->imgFilePath))->fit($this->imgWidth, $this->imgHeight)->encode());
     if ($listing_image_upload) {
         DB::table('media_resized')->insert(['media_id' => $this->mediaId, 'file' => $this->resizedImageName, 'height' => $this->imgHeight, 'width' => $this->imgWidth]);
     } else {
         Log::error('Issue Uploading the Image to the Cloud');
     }
     if ($this->attempts() === 3) {
         $this->release(1);
     }
 }
示例#2
0
 public function getAws2(Cloud $cloud)
 {
     $cloud->put('test3.txt', 'cloud - I am using aws s3');
     //$cloud->get('test3.txt');//, append(), files()
     return 'done';
 }