[im-chat-api/ac1cd36d1693651595276133635/3ms/ERROR] "/" is not a valid cloudobject path
Error: "/" is not a valid cloudobject path
at o (/tmp/function/index.js:1:1061)
at i (/tmp/function/index.js:1:1547)
at c (/tmp/function/index.js:1:2331)
at exports.main (/tmp/function/index.js:1:2821)
at Q (/tmp/function/index.js:1:24206)
at z (/tmp/function/index.js:1:25269)
at ae (/tmp/function/index.js:1:26239)
at runUserFunction (/code/index.js:98:229657)
at (<anonymous>)
请求响应状态: fail
- 发布:2023-09-02 18:55
- 更新:2024-06-11 19:37
- 阅读:798
产品分类: uniCloud/App
示例代码:
操作步骤:
云对象url化本地,通过url直接访问
云对象url化本地,通过url直接访问
预期结果:
正常访问到云对象的方法
正常访问到云对象的方法
实际结果:
[im-chat-api/ac1cd36d1693651595276133635/3ms/ERROR] "/" is not a valid cloudobject path
Error: "/" is not a valid cloudobject path
at o (/tmp/function/index.js:1:1061)
at i (/tmp/function/index.js:1:1547)
at c (/tmp/function/index.js:1:2331)
at exports.main (/tmp/function/index.js:1:2821)
at Q (/tmp/function/index.js:1:24206)
at z (/tmp/function/index.js:1:25269)
at ae (/tmp/function/index.js:1:26239)
at runUserFunction (/code/index.js:98:229657)
at (<anonymous>)
请求响应状态: fail
[im-chat-api/ac1cd36d1693651595276133635/3ms/ERROR] "/" is not a valid cloudobject path
Error: "/" is not a valid cloudobject path
at o (/tmp/function/index.js:1:1061)
at i (/tmp/function/index.js:1:1547)
at c (/tmp/function/index.js:1:2331)
at exports.main (/tmp/function/index.js:1:2821)
at Q (/tmp/function/index.js:1:24206)
at z (/tmp/function/index.js:1:25269)
at ae (/tmp/function/index.js:1:26239)
at runUserFunction (/code/index.js:98:229657)
at (<anonymous>)
请求响应状态: fail
bug描述:
云对象url化本地,通过url直接访问 报错: "/" is not a valid cloudobject path
5 个回复
DCloud_uniCloud_VK
假设url化地址是 https://www.xx.com/test 则a方法的url是 https://www.xx.com/test/a 不能直接访问 https://www.xx.com/test,这样不知道你要访问哪个方法
季兆星 (作者) - 念念堂
直接在 设置URL的PATH部分 设置之后 点击 跳转途径 的
https://www.xx.com/test/a
test 是 云对象名称
a 是云对象的 方法名称
点击跳转之后就会 返回这个
{"success":false,"error":{"code":"FunctionBizError","message":"\"/\" is not a valid cloudobject path"}}
coderMX
同样 大佬解决了吗?
2023-09-22 15:35
你干嘛一哎呀
大佬。解决了么?
季兆星 (作者)
设置URL的PATH部分 的时候 如果是 云函数 写函数名 回调路径写到函数名 如果是云对象写对象名 回调路径写到对象名/方法名
例如:云函数:设置URLhttps:www.xxxx.com/abc ---->回调 https:www.xxxx.com/abc
云对象:设置URLhttps:www.xxxx.com/boj ---->回调 https:www.xxxx.com/obj/fangfa
2023-10-27 12:23
季兆星 (作者) - 念念堂
设置URL的PATH部分 的时候 如果是 云函数 写函数名 回调路径写到函数名 如果是云对象写对象名 回调路径写到对象名/方法名
例如:云函数:设置URLhttps:www.xxxx.com/abc ---->回调 https:www.xxxx.com/abc
云对象:设置URLhttps:www.xxxx.com/boj ---->回调 https:www.xxxx.com/obj/fangfa
117