Guest User

Untitled

a guest
Jun 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. $photoName = date('Y-m-d-H-i-s').$strippedName;
  2. $avatar = Image::make($postImage->getRealPath());
  3. $avatar->save(storage_path().'/uploads/gallery/'.$photoName, 60);
  4.  
  5. $accountUrl = env('AZURE_BLOB_ENDPOINT');
  6. $accountName = env('AZURE_ACCOUNT_NAME');
  7. $accountKey = env('AZURE_ACCOUNT_KEY');
  8. $container = env('AZURE_BLOB_CONTAINER');
  9. $client = new BlobClient($accountUrl, $accountName, $accountKey);
  10. $client->putBlobData($container, '/uploads/gallery/'.$photoName, $avatar);
Add Comment
Please, Sign In to add comment