File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export function isAliyunOssUri(uri: string): boolean {
56
56
if ( region !== _region ) return false
57
57
58
58
const ext = path . extname ( vsUri . path ) . substr ( 1 )
59
- if ( ! SUPPORT_EXT . includes ( ext ) ) return false
59
+ if ( ! SUPPORT_EXT . includes ( ext . toLowerCase ( ) ) ) return false
60
60
61
61
return true
62
62
} catch {
Original file line number Diff line number Diff line change @@ -93,9 +93,7 @@ export class BucketExplorerProvider
93
93
94
94
prefix = prefix === this . uploader . configuration . bucket ? '' : prefix + '/'
95
95
96
- const res = await this . uploader . list ( {
97
- prefix
98
- } )
96
+ const res = await this . uploader . list ( { prefix } )
99
97
// we should create an empty 'folder' sometimes
100
98
// this 'empty object' is the 'parent folder' of these objects
101
99
let emptyObjectIndex : null | number = null
@@ -117,11 +115,15 @@ export class BucketExplorerProvider
117
115
if ( this . uploader . configuration . onlyShowImages ) {
118
116
//TODO: after realizing pagination, we can show all ext
119
117
filteredObject = res . objects . filter ( ( o ) => {
120
- return SUPPORT_EXT . includes ( path . extname ( o . name ) . substr ( 1 ) )
118
+ return SUPPORT_EXT . includes (
119
+ path . extname ( o . name ) . substr ( 1 ) . toLowerCase ( )
120
+ )
121
121
} )
122
122
}
123
123
const _objects = filteredObject . map ( ( p , index ) => {
124
- const isImage = SUPPORT_EXT . includes ( path . extname ( p . name ) . substr ( 1 ) )
124
+ const isImage = SUPPORT_EXT . includes (
125
+ path . extname ( p . name ) . substr ( 1 ) . toLowerCase ( )
126
+ )
125
127
const isEmpty = index === emptyObjectIndex
126
128
return new OSSObjectTreeItem ( {
127
129
...commonOptions ,
You can’t perform that action at this time.
0 commit comments