We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 085ceea + 20237c4 commit c1e2e0cCopy full SHA for c1e2e0c
src/controls/listItemAttachments/utilities.ts
@@ -34,8 +34,7 @@ export default class utilities {
34
*/
35
public GetFileImageUrl(_file: IListItemAttachmentFile): Promise<string> {
36
let _fileImageUrl: string = DOCICONURL_GENERIC;
37
- const _fileTypes = _file.FileName.split('.');
38
- const _fileExtension = _fileTypes[1];
+ const _fileExtension = _file.FileName.substr(_file.FileName.lastIndexOf('.') + 1);
39
40
if ( !_fileExtension){
41
return Promise.resolve(_fileImageUrl);
0 commit comments