云开发上传文件路径问题?
发布于 7 年前 作者 jun97 519 次浏览 来自 官方Issues

const cloudPath = 'my-image' + filePath.match(/\.[^.]+?$/)[0]

以上我没明白为什么要这样写?

const cloudPath = 'my-image.png'


也可以呀?为什么要 +  filePath.match(/\.[^.]+?$/)[0]


1 回复

打印一下filePath.match(/\.[^.]+?$/)[0] 不就知道了,别纸上谈兵

回到顶部