跳转到内容
开发者文档 / 资源接口

上传资源 Logo

上传或替换资源 Logo。调用者必须拥有该资源的编辑权限。

POST/api/resources/{resourceId}/logo/upload

鉴权方式 请求头 Api-Key、Api-Secret

Content-Type multipart/form-data

参数

位置参数类型必填说明
pathresourceIdinteger是资源 ID
form-datafilefile是PNG、JPG/JPEG 或 GIF;最大 5 MB
bash
curl -X POST 'https://resource-api.xyeidc.com/api/resources/42/logo/upload' \
  -H 'Api-Key: YOUR_API_KEY' \
  -H 'Api-Secret: YOUR_API_SECRET' \
  -F 'file=@./logo.png'

响应示例

json
{
  "code": 200,
  "msg": "Success!",
  "data": null
}

上传成功后重新获取资源详情,通过 logoImgUuid 拼接 /client/members/pics/{logoImgUuid}。新 Logo 会替换旧文件。