1
0
Fork 0
mirror of synced 2024-09-29 08:51:28 +13:00

storage device resource

This commit is contained in:
Damodar Lohani 2021-12-13 13:53:17 +05:45
parent 0481a510a4
commit b25cd9274c

View file

@ -825,11 +825,11 @@ App::setResource('dbForInternal', function($db, $cache, $project) {
return $database;
}, ['db', 'cache', 'project']);
App::setResource('storageSelf', function() {
App::setResource('deviceLocal', function() {
return new Local();
});
App::setResource('storageFiles', function($project) {
App::setResource('deviceFiles', function($project) {
switch (App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL)) {
case Storage::DEVICE_LOCAL:default:
return new Local(APP_STORAGE_UPLOADS . '/app-' . $project->getId());
@ -850,7 +850,7 @@ App::setResource('storageFiles', function($project) {
}
}, ['project']);
App::setResource('storageFunctions', function($project) {
App::setResource('deviceFunctions', function($project) {
switch (App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL)) {
case Storage::DEVICE_LOCAL:default:
return new Local(APP_STORAGE_FUNCTIONS . '/app-' . $project->getId());