fix: fix sql export (#1832)

This commit is contained in:
Alexis Saettler
2018-09-22 13:33:37 +02:00
committed by GitHub
parent 484daca6f6
commit 8dbd4b536c
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -216,7 +216,7 @@ class SettingsController extends Controller
$path = $this->dispatchNow(new ExportAccountAsSQL());
return response()
->download(Storage::disk('public')->getDriver()->getAdapter()->getPathPrefix().$path, 'monica.sql')
->download(Storage::disk(ExportAccountAsSQL::STORAGE)->getDriver()->getAdapter()->getPathPrefix().$path, 'monica.sql')
->deleteFileAfterSend(true);
}
+7 -1
View File
@@ -54,6 +54,12 @@ class ExportAccountAsSQL
protected $file = '';
protected $path = '';
/**
* Storage disk used to store the exported file.
* @var string
*/
public const STORAGE = 'public';
/**
* Create a new job instance.
*
@@ -153,7 +159,7 @@ class ExportAccountAsSQL
$sql .= $newSQLLine;
}
Storage::disk(config('filesystems.default'))->put($downloadPath, $sql);
Storage::disk(self::STORAGE)->put($downloadPath, $sql);
return $downloadPath;
}