none
Post a Image to WCF service From IPad RRS feed

  • Question

  • Hi

    I am new to WCF and trying to write a method which will accept a Image with 2 other attribute from iPad.

    Currently i am receiving it as Stream. See the request below- 

    POST
    /ServiceSide/Service.svc/savePhoto HTTP/1.1
    
    Host:
    nsittest.nsit.com.au
    
    Content-Type:
    multipart/form-data; boundary=Boundary+0xAbCdEfGbOuNdArY
    
    Transfer-Encoding:
    Chunked
    
    Accept:
    */*
    
    User-Agent:
    Inspection/0.4 (iPad Simulator; iOS 7.0.3; Scale/2.00)
    
    Accept-Language:
    en;q=1, fr;q=0.9, de;q=0.8, zh-Hans;q=0.7, zh-Hant;q=0.6, ja;q=0.5
    
    Accept-Encoding:
    gzip, deflate
    
    Connection:
    keep-alive
    
    
    
    --Boundary+0xAbCdEfGbOuNdArY
    
    Content-Dis-data; name="Password"
    
    
    
    jerry
    
    --Boundary+0xAbCdEfGbOuNdArY
    
    Content-Dis-data; name="PhotoKey"
    
    
    
    Some
    Photo Key
    
    --Boundary+0xAbCdEfGbOuNdArY
    
    Content-Dis-data; name="UserEmail"
    
    
    
    jerry
    
    --Boundary+0xAbCdEfGbOuNdArY
    
    Content-Dis-data; name="file"; filename="Some Image Name"
    
    Content-Type:
    image/jpg
    
    
    
    ˇÿˇ‡JFIFˇ·åExifMM*JR(áiZ††–†™ˇ€Cˇ€Cˇ¿™–ˇƒ­   
    
    
    ˇƒµ}!1AQa"q2Åë°#B±¡R—$3brÇ        
    
    %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzÉÑÖÜáàâäíìîïñóòôö¢£§•¶ß®©™≤≥¥µ∂∑∏π∫¬√ƒ≈∆«»…
    “”‘’÷◊ÿŸ⁄·‚„‰ÂÊÁËÈÍÒÚÛÙıˆ˜¯˘˙ˇƒ­          
    
    
    ˇƒµw!1AQaq"2ÅBë°±¡        #3Rbr—
    
    $4·%Ò&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzÇÉÑÖÜáàâäíìîïñóòôö¢£§•¶ß®©™≤≥¥µ∂∑∏π∫¬√ƒ≈∆«»…
    “”‘’÷◊ÿŸ⁄‚„‰ÂÊÁËÈÍÚÛÙıˆ˜¯˘˙ˇ⁄
    ?˛˛(†Ä.................. ...............................

    And my Service Receiving like this-

    But i just dont know how can i read the data (name, fileName) from the stream and save the picture in server.

    Please help, i am stuck for more that 1 week. :(

    Thanks in advance


    Ahnaf


    Thursday, January 16, 2014 2:17 AM

Answers