When copying and pasting pictures to upload automatically, it is found that the enterprise WeChat browser will recognize the file type as Blob type, so that the backend cannot recognize the file type.
After querying, it is found that converting the Blob file to a File file can solve the problem.
This is a screenshot of the definition of Blob in
MDN: This is the parameter required to construct a File type in MDN:
This is my implementation method:
const Blob2ImageFileForWXBrowser = (obj: Blob) => new window.File([obj], `${
(new Date).getTime()}.png` );