fix: only lower letter readme.md can display.

pull/217/head
qkqpttgf 2021-01-24 17:47:51 +08:00 committed by GitHub
parent 0b6adc077c
commit 12ff9da6f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 8 deletions

View File

@ -66,18 +66,19 @@ class Aliyundrive {
$tmp['size'] = $files['size']; $tmp['size'] = $files['size'];
//$tmp['page'] = $files['folder']['page']; //$tmp['page'] = $files['folder']['page'];
foreach ($files['items'] as $file) { foreach ($files['items'] as $file) {
$filename = strtolower($file['name']);
if ($file['type']=='file') { if ($file['type']=='file') {
$tmp['list'][$file['name']]['type'] = 'file'; $tmp['list'][$filename]['type'] = 'file';
$tmp['list'][$file['name']]['url'] = $file['download_url']; $tmp['list'][$filename]['url'] = $file['download_url'];
$tmp['list'][$file['name']]['mime'] = $file['file']['content_type']; $tmp['list'][$filename]['mime'] = $file['file']['content_type'];
} elseif ($file['type']=='folder') { } elseif ($file['type']=='folder') {
$tmp['list'][$file['name']]['type'] = 'folder'; $tmp['list'][$filename]['type'] = 'folder';
} }
//$tmp['id'] = $file['parent_file_id']; //$tmp['id'] = $file['parent_file_id'];
$tmp['list'][$file['name']]['id'] = $file['file_id']; $tmp['list'][$filename]['id'] = $file['file_id'];
$tmp['list'][$file['name']]['name'] = $file['name']; $tmp['list'][$filename]['name'] = $file['name'];
$tmp['list'][$file['name']]['time'] = $file['updated_at']; $tmp['list'][$filename]['time'] = $file['updated_at'];
$tmp['list'][$file['name']]['size'] = $file['size']; $tmp['list'][$filename]['size'] = $file['size'];
$tmp['childcount']++; $tmp['childcount']++;
} }
} elseif (isset($files['code'])) { } elseif (isset($files['code'])) {