我有一个按钮,当单击/按下时将触发输入类型=文件上的click()并允许用户上传文件,它在每个平台上都可以正常工作,但有时我需要在打开上传之前发出请求窗口,当我需要发出请求时,它可以在除Safari/IOS Safarai之外的每个平台上工作,在Safari中发出请求并且我得到响应,但不会触发输入 click()。
\n这是我的代码。
\n async handleClickUpload(origin: string) {\n try {\n this._setDocumentType({ origin });\n const { code: documentCode } = this.currentDocument;\n\n if (this._isDocumentBackVariant(documentCode)) {\n await this._variantBackDocumentHandler();\n }\n this._handleUploadMethod();\n } catch (e) {\n console.error(e);\n }\n }\nRun Code Online (Sandbox Code Playgroud)\n在这里我提出请求并设置文档的变体,(它在 Safari 上工作正常)
\n async _variantBackDocumentHandler() {\n const { variation } = await this.getSpecificDocument("cnh_rg_frente");\n\n console.error("Encontrou varia\xc3\xa7\xc3\xa3o", variation);\n if (!variation) {\n this._setDocumentType({ open: true });\n throw new Error("Varia\xc3\xa7\xc3\xa3o n\xc3\xa3o encontrada");\n }\n this._setDocumentType({ variation …Run Code Online (Sandbox Code Playgroud)