We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40daef4 commit 5511672Copy full SHA for 5511672
src/packages/uploader/upload.ts
@@ -88,10 +88,12 @@ export class UploaderTaro extends Upload {
88
89
uploadTaro(uploadFile: any, env: string) {
90
const options = this.options
91
+ if (options.beforeXhrUpload) {
92
+ options.beforeXhrUpload(uploadFile, options)
93
+ return
94
+ }
95
if (env === 'WEB') {
96
this.upload()
- } else if (options.beforeXhrUpload) {
- options.beforeXhrUpload(uploadFile, options)
97
} else {
98
const uploadTask = uploadFile({
99
url: options.url,
0 commit comments