contentful-management
Version:
Client for Contentful's Content Management API
17 lines • 555 B
JavaScript
/**
* @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;
}