paraworld.file.GetFile

Description

依据文件ID或文件逻辑地址取得一个用户文件的数据

Parameters

Required Name Type Description
required sessionKey string 用户凭证。
optional fileID int 文件ID,filePath和fileID中必须有一个有值,若fileID有值,则忽略filePath
filePath string 文件的逻辑地址,filePath和fileID中必须有一个有值,若fileID有值,则忽略filePath
ownerUID string 文件所有者的用户ID,若不传此参数,则指当前用户

Example Return XML

<msg xmlns="">
        <id type="int">3</isSuccess>
        <fileURL>http://192.168.0.221:81/Uploads/UserUpload/2008-5-7/a373295b-aecc-47d4-bc59-50ba00289602.jpg</fileURL>
        <filePath>map/map1.jpg</filePath>
        <createDate>2008-5-10 10:37:18</createDate>
        <uid>6ea1ce24-bdf7-4893-a053-eb5fd2a74281</uid>
</msg>

Error Codes

当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了错误码。0:无异常 500:未知错误 499:提供的数据不完整 498:非法的访问 497:数据不存在或已被删除 496:未登录 409:文件夹已存在 410:文件已存在

Test Cases

case 1

Input:

{

        ["filePath"]="map/map1.jpg",

        ["sessionKey"]="dec79cec-a151-476f-954f-027ef8ddac2a",

}

Result:

{

        ["id"]=3,

        ["fileURL"]="http://192.168.0.221:81/Uploads/UserUpload/2008-5-7/a373295b-aecc-47d4-bc59-50ba00289602.jpg",

        ["filePath"]="map/map1.jpg",

        ["createDate"]="2008-5-10 10:37:18",

        ["uid"]="6ea1ce24-bdf7-4893-a053-eb5fd2a74281"

}
Topic revision: r5 - 2008-07-14 - CaoYF
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback