The ios applet uploads files and uses onHeadersReceived to get the parameters in the header

There was a problem when uploading the applet last week. Due to the oss used, the Etag in the header can be obtained normally on the Android phone, but the parameters in the header cannot be obtained when uploading on ios. Tried many ways.
insert image description here
insert image description here

Later, I found that onHeadersReceived could get the header and tried to use it, but the result indicated that onHeadersReceived could not be found. At that time our project was using taro 3.2.x. At that time, I didn't consider the issue of the version. I took a lot of detours and tried many methods. Finally, it was found that the version of the taro framework itself was too low. After the version was upgraded, ETag could also be obtained in ios. I have to say that I have been stepping on pits everywhere since I came into contact with applets not long ago.

const etag = res.header.Etag;

You can get it.

Guess you like

Origin blog.csdn.net/weixin_46613448/article/details/129432133