From 12ff9da6f4c7c11928dad2b6004cf0bfbd6247d3 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 24 Jan 2021 17:47:51 +0800 Subject: [PATCH] fix: only lower letter readme.md can display. --- disk/Aliyundrive.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/disk/Aliyundrive.php b/disk/Aliyundrive.php index 4a9a216..e29ee1a 100644 --- a/disk/Aliyundrive.php +++ b/disk/Aliyundrive.php @@ -66,18 +66,19 @@ class Aliyundrive { $tmp['size'] = $files['size']; //$tmp['page'] = $files['folder']['page']; foreach ($files['items'] as $file) { + $filename = strtolower($file['name']); if ($file['type']=='file') { - $tmp['list'][$file['name']]['type'] = 'file'; - $tmp['list'][$file['name']]['url'] = $file['download_url']; - $tmp['list'][$file['name']]['mime'] = $file['file']['content_type']; + $tmp['list'][$filename]['type'] = 'file'; + $tmp['list'][$filename]['url'] = $file['download_url']; + $tmp['list'][$filename]['mime'] = $file['file']['content_type']; } elseif ($file['type']=='folder') { - $tmp['list'][$file['name']]['type'] = 'folder'; + $tmp['list'][$filename]['type'] = 'folder'; } //$tmp['id'] = $file['parent_file_id']; - $tmp['list'][$file['name']]['id'] = $file['file_id']; - $tmp['list'][$file['name']]['name'] = $file['name']; - $tmp['list'][$file['name']]['time'] = $file['updated_at']; - $tmp['list'][$file['name']]['size'] = $file['size']; + $tmp['list'][$filename]['id'] = $file['file_id']; + $tmp['list'][$filename]['name'] = $file['name']; + $tmp['list'][$filename]['time'] = $file['updated_at']; + $tmp['list'][$filename]['size'] = $file['size']; $tmp['childcount']++; } } elseif (isset($files['code'])) {