When reading a file, sometimes the file cannot be opened and an empty text file is automatically generated. The reason may be that the file contains special characters. When url escaping is performed, the specified file cannot be found after encoding, and an error is finally reported.
When entering the URL address, you can use
the encodeURIComponent(path) method to escape the link.
const href = `/api/${
Id}/file?access_token=${
token}&path=${
encodeURIComponent(path)}`;