diff options
| author | ilotterytea <iltsu@alright.party> | 2025-06-04 18:44:10 +0400 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-06-04 18:44:10 +0400 |
| commit | 8245832be8470f20091eb71946fdeff3cab79aa7 (patch) | |
| tree | be375483c1e81f0ad3e23f688efe88fea5544366 /public/upload.php | |
| parent | 27027f5b6a9ea2a4cb5f2324018be8ce0f22cc50 (diff) | |
feat: file page
Diffstat (limited to 'public/upload.php')
| -rw-r--r-- | public/upload.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/public/upload.php b/public/upload.php index 1f5b838..0d8a7e3 100644 --- a/public/upload.php +++ b/public/upload.php @@ -176,6 +176,8 @@ try { if (FILE_METADATA) { unset($file_data['urls']); $file_data['password'] = password_hash($file_data['password'], PASSWORD_DEFAULT); + $file_data['views'] = 0; + $file_data['uploaded_at'] = time(); if (!is_dir(FILE_METADATA_DIRECTORY) && !mkdir(FILE_METADATA_DIRECTORY, 0777, true)) { throw new RuntimeException('Failed to create a folder for file metadata'); } |
