fix: preserve qualification file names across uploads

This commit is contained in:
2026-09-21 22:44:01 +08:00
parent 8d66610964
commit cf09720beb
3 changed files with 32 additions and 4 deletions
@@ -60,8 +60,8 @@ export async function run(context, { publishEnvironment = true } = {}) {
if (!tenantId || !username || !password) throw new Error('创建下单客户未返回完整管理员凭据')
const packageForm = new FormData()
packageForm.append('businessLicense', new Blob([QUALIFICATION_IMAGE], { type: 'image/png' }), `business-${suffix}.png`)
packageForm.append('legalPersonId', new Blob([QUALIFICATION_IMAGE], { type: 'image/png' }), `legal-person-${suffix}.png`)
packageForm.append('businessLicense', new File([QUALIFICATION_IMAGE], `business-${suffix}.png`, { type: 'image/png' }))
packageForm.append('legalPersonId', new File([QUALIFICATION_IMAGE], `legal-person-${suffix}.png`, { type: 'image/png' }))
const unifiedSocialCreditCode = `91440300${suffix}`
const packageResponse = await context.requestWithBody('POST',
`/api/platform/v1/files/qualifications/${encodeURIComponent(tenantId)}/required-package?unifiedSocialCreditCode=${encodeURIComponent(unifiedSocialCreditCode)}`,