diff options
| author | ilotterytea <iltsu@alright.party> | 2025-06-18 15:19:21 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-06-18 15:19:21 +0500 |
| commit | aeff80740333ec49d13638f36b2bc74bc820404c (patch) | |
| tree | 16daf7a82b950bc278383828e50cf410a6e9f7f9 /public/upload.php | |
| parent | 70f40b94ad7f2d9eeb82a9313049e96d8fbc068d (diff) | |
feat: set file password
Diffstat (limited to 'public/upload.php')
| -rw-r--r-- | public/upload.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/public/upload.php b/public/upload.php index 8ad01e1..f578631 100644 --- a/public/upload.php +++ b/public/upload.php @@ -242,7 +242,7 @@ try { 'download_url' => INSTANCE_URL . "/{$file_data['id']}.{$file_data['extension']}" ]; - if (FILE_DELETION) { + if (FILE_DELETION && !empty($_POST['password'])) { $file_data['password'] = $_POST['password'] ?? generate_random_char_sequence(FILE_ID_CHARACTERS, FILE_DELETION_KEY_LENGTH); $file_data['urls']['deletion_url'] = INSTANCE_URL . "/delete.php?f={$file_data['id']}.{$file_data['extension']}&key={$file_data['password']}"; } |
