Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

问题描述

我正在使用 electronVue 框架开发一个可以管理 webdav 服务器上的文件的工具,但是遇到了不知道是如何发生的错误。

报错信息和截图

TypeError: Url must be a string. Received undefined

image.png

相关代码

/**
 * 上传文件
 * @param {object} client webdav对象
 * @param {string} localPath 本地路径
 * @param {string} path 远程路径
 */
export const uploadFile = (client, localPath, remotePath) => {
    let data = fs.readFileSync(localPath);
    return client.putFileContents(
      remotePath + '/' + path.basename(localPath),
      data
    );
};

这个问题困扰了我很长时间,多方查找也没找到报错原因,希望能得到解决方案。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
428 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...