mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
remove folders from demo names
This commit is contained in:
parent
7de4c35ab4
commit
86ffe80044
1 changed files with 3 additions and 0 deletions
|
|
@ -47,6 +47,9 @@ class UploadProvider extends BaseProvider {
|
|||
}
|
||||
|
||||
public function upload(string $key, string $red, string $blu, string $name, string $demoFile): string {
|
||||
$nameParts = explode('/', $name);
|
||||
$name = array_pop($nameParts);
|
||||
|
||||
$user = $this->userProvider->byKey($key);
|
||||
if (!$user || ('' !== $this->uploadKey && $this->uploadKey !== $key)) {
|
||||
throw new InvalidKeyException('Invalid key');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue