There is definitely no problem reading files with fs. It is recommended that you first try using h5 to manually select whether the file can be uploaded. After success, you can use fs to read the file locally and upload it.
http://blog.tingyun.com/web/a... I wonder if this can give you some inspiration.
Deploy any file upload interface on the server, including PHP, .NET, and NODEJS. Then make a local web page to test the file upload. After adjusting, use the desktop program to debug.
Pay attention to the read and write permissions of the upload directory, the server's restrictions on file upload format and size, and whether the remote call interface involves cross-domain issues (generally POST is not allowed across domains).
It doesn’t look like you are doing something good
You need to check Alibaba Cloud's interface to see what they accept, and then find out what you use to send.
There is definitely no problem reading files with fs. It is recommended that you first try using h5 to manually select whether the file can be uploaded. After success, you can use fs to read the file locally and upload it.
http://blog.tingyun.com/web/a...
I wonder if this can give you some inspiration.
Open a new thread to upload files.
Deploy any file upload interface on the server, including PHP, .NET, and NODEJS. Then make a local web page to test the file upload. After adjusting, use the desktop program to debug.
Pay attention to the read and write permissions of the upload directory, the server's restrictions on file upload format and size, and whether the remote call interface involves cross-domain issues (generally POST is not allowed across domains).
I use fs to read and upload the error like this