search

Home  >  Q&A  >  body text

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

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

巴扎黑巴扎黑2782 days ago908

reply all(5)I'll reply

  • PHPz

    PHPz2017-04-17 15:48:46

    It doesn’t look like you are doing something good

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 15:48:46

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

    reply
    0
  • PHPz

    PHPz2017-04-17 15:48:46

    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.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 15:48:46

    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).

    reply
    0
  • 阿神

    阿神2017-04-17 15:48:46

    I use fs to read and upload the error like this

    reply
    0
  • Cancelreply