chdir($currentPath)) { die("Failed to navigate to the selected folder: $currentPath"); } $items = $sftp->nlist(); if ($items === false) { http_response_code(500); exit('Failed to list directory contents.'); } $imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'svg']; $videoExtensions = ['mp4', 'webm', 'ogg', 'mov', 'avi', 'mkv']; $audioExtensions = ['mp3', 'wav', 'm4a', 'flac', 'aac']; $editableExtensions = ['txt', 'html', 'css', 'js', 'php', 'xml', 'json', 'md', 'csv', 'log', 'ini', 'conf', 'sh', 'bat', 'py', 'rb', 'java', 'c', 'cpp', 'h', 'hpp']; $archiveExtensions = ['zip', 'rar', 'tar', 'gz', '7z', 'bz2', 'xz', 'tar.gz', 'tar.bz2', 'tar.xz']; ?>
| Name | Size | Actions |
|---|---|---|
| ↑ Parent folder | ||
| = htmlspecialchars($directory) ?> | — | |
| = htmlspecialchars($file) ?> Image Video Audio = htmlspecialchars($file) ?> = htmlspecialchars($fileExtension) ?> = htmlspecialchars($file) ?> PDF = htmlspecialchars($file) ?> = htmlspecialchars($fileExtension) ?> | = formatBytes($sftp->stat(rtrim($currentPath, '/') . '/' . $file)['size']) ?> | |
Try another search or upload files to this folder.