云开发上传文件路径问题?

小程序 文章 2020-07-31 09:34 519 0 全屏看文

AI助手支持GPT4.0

云开发上传文件路径问题?

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

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

const cloudPath = 'my-image.png'


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


const cloudPath = 'my-image' + filePath.match (/ . [^.] +? $/) [0] I don't understand why I write it like this? const cloudPath = 'my- image.png 'it's OK? Why+ filePath.match (/.[^.]+?$/)[0]

-EOF-

AI助手支持GPT4.0