_setContentType()

in source/custom-resource/lib/s3-helper.js [253:272]


    _setContentType(file) {
        let _contentType = 'binary/octet-stream';
        if (file.endsWith('.html')) {
            _contentType = 'text/html';
        } else if (file.endsWith('.css')) {
            _contentType = 'text/css';
        } else if (file.endsWith('.png')) {
            _contentType = 'image/png';
        } else if (file.endsWith('.svg')) {
            _contentType = 'image/svg+xml';
        } else if (file.endsWith('.jpg')) {
            _contentType = 'image/jpeg';
        } else if (file.endsWith('.js')) {
            _contentType = 'application/javascript';
        } else if (file.endsWith('.json')) {
            _contentType = 'application/json';
        }

        return _contentType;
    }