Cheers.
So having some more dificulty in composer.json i have added
"league/flysystem-aws-s3-v3": "dev-master"
in config/fileSystems i have changed default to 's3'
'default' => 's3',
'cloud' => 's3',
and set my details in the s3 setting in that file
commited and done an heroku push composer update etc still uploading it to heroku
locally its still uploading to the public folder have i missed anywhere?
namespace App;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
use App\Http\Requests;
use Illuminate\Support\Facades\DB;
use Thujohn\Twitter\Facades\Twitter;
public function handelFileUploads(Requests\FixtureUpdateRequest $request, Fixture $fixture, $name)
{
//get the old record
$oldData = $fixture->$name;
if ($request->file($name)) {
$file = $request->file($name);
//set paths
if(($name == 'start_sheet_skeleton')||($name == 'start_sheet_official')){
$destinationPath = $fixture->zone->league->name . '/' . $fixture->zone->name . '/' . $fixture->name . '/startsheets/' ;
$destinationPath = strtolower($destinationPath);
//Convert whitespaces and underscore to dash
$destinationPath = preg_replace("/[\s_]/", "-", $destinationPath);
}else{
$destinationPath = $fixture->zone->league->name . '/' . $fixture->zone->name . '/' . $fixture->name . '/results/';
$destinationPath = strtolower($destinationPath);
//Convert whitespaces and underscore to dash
$destinationPath = preg_replace("/[\s_]/", "-", $destinationPath);
}
//Move Uploaded File
$fileName = $file->getClientOriginalName();
$fileName = time() . '-' .preg_replace("/[\s_]/", "-", $fileName);
$file->move($destinationPath, $fileName);
$path = $destinationPath . $fileName;
// tweet that a file has been updated.
// $this->sendFixtureUpdateTweet($fixture, $name);
return $path;
} else {
return $oldData;
}
}