UNPKG

contentful-management

Version:
17 lines 555 B
/** * @private */ export function getUploadHttpClient(http, options) { var _ref; const { hostUpload, defaultHostnameUpload, timeout } = http.httpClientParams; const uploadHttp = http.cloneWithNewParams({ host: hostUpload || defaultHostnameUpload, // Using client presets, options or 5 minute default timeout timeout: (_ref = timeout !== null && timeout !== void 0 ? timeout : options === null || options === void 0 ? void 0 : options.uploadTimeout) !== null && _ref !== void 0 ? _ref : 300000 }); return uploadHttp; }