Skip to content

Commit

Permalink
File upload fixes (#56)
Browse files Browse the repository at this point in the history
* Some work on files upload refactor

* Fixes after files upload refactor

* Croppa fixes
  • Loading branch information
PSkierniewski authored and AdrianSkierniewski committed Mar 20, 2017
1 parent f53b93d commit 57e18e7
Show file tree
Hide file tree
Showing 13 changed files with 399 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ S3_SECRET=
S3_REGION=
S3_BUCKET=

UPLOAD_DIR=uploads
UPLOAD_DISK=uploads
4 changes: 3 additions & 1 deletion .env.testing
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ MAIL_ENCRYPTION=null

PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=
PUSHER_SECRET=

UPLOAD_DISK=test
12 changes: 12 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
use Barryvdh\Debugbar\ServiceProvider as DebugbarServiceProvider;
use Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider;
use Illuminate\Support\ServiceProvider;
use League\Flysystem\Adapter\NullAdapter;
use League\Flysystem\Filesystem;

class AppServiceProvider extends ServiceProvider
{
Expand All @@ -15,6 +17,16 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot()
{
if(env('APP_ENV') === 'testing'){
// Use null adapter for tests
app('filesystem')->extend(
'nullAdapter',
function () {
return new Filesystem(new NullAdapter());
}
);
}

view()->composer(
'includes.disqus.disqus',
function ($view) {
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"gzero/cms": "dev-master",
"gzero/api": "dev-master",
"gzero/admin": "dev-master",
"predis/predis": "^1.1"
"predis/predis": "^1.1",
"league/flysystem-aws-s3-v3": "^1.0"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "2.2.*",
Expand Down
Loading

0 comments on commit 57e18e7

Please sign in to comment.