文档中心 > API类目 > AE-图片银行

aliexpress.photobank.redefining.uploadimage (上传图片到图片银行)

上传图片到图片银行(由于无法实现图片的上传、下载,故该测试工具不可用。)

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
file_name String 可选 0 上传文件名称,长度不要超过256个字符。
group_id String 可选 0 图片保存的图片组,groupId为空,则图片保存在Other组中。
image_bytes byte[] 可选 0 图片文件的字节流图片大小限制:3MB
支持的文件类型:

响应参数

名称 类型 示例值 描述
result AeopUploadImageResponse 0 result
  • └ error_message
  • String
  • 系统异常!
  • 错误信息
  • └ file_name
  • String
  • test2.png
  • 图片的名称。
  • └ height
  • Number
  • 1210
  • 图片的高度。单位:像素
  • └ photobank_total_size
  • String
  • 6144.00
  • 图片银行总的空间大小。单位:MB
  • └ photobank_url
  • String
  • http://g02.a.alicdn.com/kf/HTB1.v4sJXXXXXcgXXXX760XFXXXe/200042360/HTB1.v4sJXXXXXcgXXXX760XFXXXe.png
  • 这张图片的URL。
  • └ photobank_used_size
  • String
  • 96.95
  • 已经使用了的图片银行空间。单位:MB
  • └ status
  • String
  • SUCCESS
  • 图片上传的结果。
  • └ success
  • Boolean
  • true
  • 接口调用的结果。
  • └ width
  • Number
  • 858
  • 图片的宽度。单位:像素
  • └ error_code
  • Number
  • 16009999
  • 错误代码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AliexpressPhotobankRedefiningUploadimageRequest req = new AliexpressPhotobankRedefiningUploadimageRequest();
req.setFileName("0");
req.setGroupId("0");
req.setImageBytes(new FileItem("/tmp/file.txt"));
AliexpressPhotobankRedefiningUploadimageResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<aliexpress_photobank_redefining_uploadimage_response>
    <result>
        <error_message>系统异常!</error_message>
        <file_name>test2.png</file_name>
        <height>1210</height>
        <photobank_total_size>6144.00</photobank_total_size>
        <photobank_url>http://g02.a.alicdn.com/kf/HTB1.v4sJXXXXXcgXXXX760XFXXXe/200042360/HTB1.v4sJXXXXXcgXXXX760XFXXXe.png</photobank_url>
        <photobank_used_size>96.95</photobank_used_size>
        <status>SUCCESS</status>
        <success>true</success>
        <width>858</width>
        <error_code>16009999</error_code>
    </result>
</aliexpress_photobank_redefining_uploadimage_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部