mirror of
https://github.com/projectsend/projectsend.git
synced 2026-09-17 09:05:08 +00:00
6e47d76ba6
Client file sharing, rebuilt from the ground up: a private area per client, resumable uploads, folders, groups and categories, sharing with expiry dates and download limits, comments, file versions, an activity log, a REST API, and sixteen languages. This repository begins here. ProjectSend 2 was developed privately, and that development history is not published — the previous generation remains available, with its own history, at projectsend/legacy. Free software under the GNU General Public License v2, or (at your option) any later version.
30 lines
933 B
PHP
30 lines
933 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Files\Storage;
|
|
|
|
use App\Models\User;
|
|
|
|
/**
|
|
* Dispatched once per upload, before bytes are written, to decide which
|
|
* Laravel disk they should land on. Defaults to the local 'files' disk —
|
|
* a fresh or Cloud install has nothing listening, so behavior is
|
|
* unchanged from before this event existed.
|
|
*
|
|
* A listener (see ExternalStorageConfigApplier) sets $disk to
|
|
* 'files_external' when the community-only external storage settings are
|
|
* active. Deliberately a plain event with a mutable property, not an
|
|
* interface a listener must implement — core never references any
|
|
* specific feature's class this way, so nothing here breaks if no
|
|
* listener is registered at all (see docs/extension-points-architecture.md).
|
|
*/
|
|
class ResolvingUploadDisk
|
|
{
|
|
public string $disk = 'files';
|
|
|
|
public function __construct(
|
|
public readonly User $uploader,
|
|
) {}
|
|
}
|