node.js - 做的桌面应用,怎么自动读取本地音频文件并上传到阿里云服务器(不管使用什么技术:node,electron,h5……)
巴扎黑
巴扎黑 2017-04-17 15:46:46
0
5
864

使用electron做的桌面应用,需要自动上传音频文件到阿里云服务器,路径是知道的,在用户不点击选择文件的情况下,就可以上传,尝试了fs,上传失败,求助,不管使用什么技术:node,electron,h5……,能上传就行

巴扎黑
巴扎黑

reply all(5)
PHPzhong

It doesn’t look like you are doing something good

Peter_Zhu

You need to check Alibaba Cloud's interface to see what they accept, and then find out what you use to send.

PHPzhong

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!