Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //store file input in a varaible
- $file = Input::file('image');
- //Retrieving The Extension Of An Uploaded File
- $extension = $file->getClientOriginalExtension();
- //define directory to store images
- $directory = public_path().'/uploads/images';
- //Move the uploaded file to temp directory
- $s3 = AWS::get('s3');
- $upload_success = $s3->putObject([
- 'ACL' => 'public-read',
- 'Bucket' => 'styleblink',
- 'Key' => $directory,
- 'Body' => fopen($file->getPathname(), 'r'),
- ]);
Add Comment
Please, Sign In to add comment