//#region extensions/weixin/src/cdn/cdn-url.ts
/**
* Unified CDN URL construction for Weixin CDN upload/download.
*/
/** When true, if the server omits `full_url`, fall back to client-built URLs; when false, require `full_url`. */
const ENABLE_CDN_URL_FALLBACK = true;
/** Build a CDN download URL from encrypt_query_param. */
function buildCdnDownloadUrl(encryptedQueryParam, cdnBaseUrl) {
	return `${cdnBaseUrl}/download?encrypted_query_param=${encodeURIComponent(encryptedQueryParam)}`;
}
/** Build a CDN upload URL from upload_param and filekey. */
function buildCdnUploadUrl(params) {
	return `${params.cdnBaseUrl}/upload?encrypted_query_param=${encodeURIComponent(params.uploadParam)}&filekey=${encodeURIComponent(params.filekey)}`;
}
//#endregion
export { ENABLE_CDN_URL_FALLBACK, buildCdnDownloadUrl, buildCdnUploadUrl };

//# sourceMappingURL=cdn-url.js.map