Changes between Version 6 and Version 7 of API/BBS/Upload-Picture


Ignore:
Timestamp:
04/21/2011 11:53:16 AM (15 years ago)
Author:
lee
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • API/BBS/Upload-Picture

    v6 v7  
    1 [[TOC]] 
     1n[[TOC]] 
     2 
     3= Uplaod Picture = 
     4 
     5 
     6|| URL || http://upc.pcauto.com.cn/upload_quick.jsp, http://test745.pconline.com.cn:9192/uploadcenter/upload_quick.jsp?application=yidong ( use in develop env) ||  
     7|| Method || POST || 
     8|| Form field name || file || 
     9 
     10'''Request Headers''' 
     11 
     12(use in develop env) 
     13 
     14|| name || value ||  
     15|| Cookie || common_session_id1=1E206769DF2AC93174ACCA2C04D86B60B43FD0351F1331A8"); 
     16 
     17 
     18'''Server Limit''' 
     19 
     20|| filename || ASCII || 
     21|| image format || .jpg .bmp .png || 
     22|| max-width || 500 px || 
    223 
    324== Java Demo == 
     
    2950|| UPC_OK ||               0 || 成功 || 
    3051|| UPC_NO_TRANSACTION_SPECIFIED ||   1 || 事务编码未指定 || 
    31 || UPC_SPECIFIED_TRANSACTION_NOT_FOUND     2 || 事务编码不存在 || 
     52|| UPC_SPECIFIED_TRANSACTION_NOT_FOUND ||     2 || 事务编码不存在 || 
    3253|| UPC_CREATE_TRANSACTION_FAILED ||   3 || 创建事务失败 || 
    3354|| UPC_INVALID_PARAMETERS ||           4 || 非法的参数 || 
     
    4364|| UPC_SIZE_LIMITED_EXCEED ||     14 || 文件大小超出规定 || 
    4465|| UPC_NO_APPLICATION_SPECIFIED ||   15 || 未指定应用编码 || 
    45 || UPC_COMMIT_FAILED ||   16|| || 
    46 || UPC_SPECIFIED_APPLICATION_NOT_FOUND ||      17|| || 
    47 || UPC_INVALID_COMMAND ||   18|| || 
    48 || UPC_INVALID_USER ||   19|| || 
    49 || UPC_ERROR_OTHERS ||   100|| 未知错误 || 
     66|| UPC_COMMIT_FAILED ||   16 || || 
     67|| UPC_SPECIFIED_APPLICATION_NOT_FOUND ||      17 || || 
     68|| UPC_INVALID_COMMAND ||   18 || || 
     69|| UPC_INVALID_USER ||   19 || || 
     70|| UPC_ERROR_OTHERS ||   100 || 未知错误 || 
    5071 
    5172 
     
    6788 
    6889    public static void main(String[] args) { 
    69  
    70         testUpload(); 
    71         
    72     } 
    73     
     90        testUpload();        
     91    }    
    7492 
    7593    public static void testUpload() throws IOException { 
     
    90108        // 测试环境获得cookie方法:http://test232.pconline.com.cn:7003/passport2/ 测试环境登录:ddd/123456 
    91109        post.setHeader("Cookie", "common_session_id1=1E206769DF2AC93174ACCA2C04D86B60B43FD0351F1331A8"); 
    92  
    93110        post.setEntity(reqEntity); 
    94111 
     
    96113 
    97114        System.out.println(response.getStatusLine()); 
    98  
    99115        System.out.println(EntityUtils.toString(response.getEntity())); 
    100116 
     
    105121} 
    106122}}} 
    107  
    108 || filename || ASCII || 
    109 || MIME || .jpg .bmp .png || 
    110 || max-width || 500 ||