fix: dir mounts should have proper dirs

This commit is contained in:
Andras Bacsai 2024-08-05 18:38:13 +02:00
parent 3269ca3eb8
commit 8133a8b770

View File

@ -54,7 +54,11 @@ class Add extends Component
public function mount()
{
$this->file_storage_directory_source = application_configuration_dir()."/{$this->resource->uuid}";
if (str($this->resource->getMorphClass())->contains('Standalone')) {
$this->file_storage_directory_source = database_configuration_dir()."/{$this->resource->uuid}";
} else {
$this->file_storage_directory_source = application_configuration_dir()."/{$this->resource->uuid}";
}
$this->uuid = $this->resource->uuid;
$this->parameters = get_route_parameters();
if (data_get($this->parameters, 'application_uuid')) {