@raona/sp
Version:
Raona utilities to work with Sharepoint using pnp/sp
13 lines (12 loc) • 436 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function getFileExtensionNameByUrl(file) {
if (typeof file === 'string') {
return file.substr(file.lastIndexOf('.'));
}
else {
return file.ServerRelativeUrl.substr(file.ServerRelativeUrl.lastIndexOf('.'));
}
//TODO: remove querystring if present
}
exports.getFileExtensionNameByUrl = getFileExtensionNameByUrl;