Richard Anderson a73476c1dd
Edit & Download (local) Backups (#436)
* Allow editing of backups

* pint updates

* setup of backup download

* allow download for local backup files

* delete uploaded files on delete of BackupFile

* pint updates

* S3 upload & download fixes

* Deletion of backup files

* support $ARCH selector for s3 installation

* delete files when deleting backup

* fixed ui issue

* adjustment

* Use system temp path for downloads

---------

Co-authored-by: Saeed Vaziry <mr.saeedvaziry@gmail.com>
2025-01-25 21:59:35 +01:00

34 lines
603 B
PHP

<?php
namespace App\StorageProviders;
use App\Models\Server;
use App\SSH\Storage\Storage;
class Local extends AbstractStorageProvider
{
public function validationRules(): array
{
return [
'path' => 'required',
];
}
public function credentialData(array $input): array
{
return [
'path' => $input['path'],
];
}
public function connect(): bool
{
return true;
}
public function ssh(Server $server): Storage
{
return new \App\SSH\Storage\Local($server, $this->storageProvider);
}
}