0

Upload Attachment output

Hello,

Sorry to resurrect an old thread, but I'm guessing maybe other people are running into the same issue I am. I have my UploadAttachment call working, but the result always comes back as XML instead of JSON. I think the problem is I don't know how to pass the parameters in the POST properly, since one of them specifies the response format. Below is what I'm currently sending in my POST. I'm sure there's something trivial I'm missing.

Thanks!

--EZY2eO_h7fJ_rwh7e2umpfepPPs5KSxxXxs
Content-Disposition: form-data; name="UploadAttachment"
Content-Type: application/json; charset=UTF-8
Content-Transfer-Encoding: 8bit

{method:"UploadAttachment", params: [{uploadfile:"/Users/mike/Downloads/Logo.png", output: "json"}]}
--EZY2eO_h7fJ_rwh7e2umpfepPPs5KSxxXxs
Content-Disposition: form-data; name="uploadedFile"; filename="Logo.png"
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary

‰PNG


by
2 Replies
  • Hi,

    I split your post from where it was previously for benefit of everyone. Please specify ?output=json in url request parameters. I guess it should work. Thanks.

    --R



    QUOTE (BoulderMike @ Dec 21 2010, 09:04 AM) <{POST_SNAPBACK}>
    Hello,

    Sorry to resurrect an old thread, but I'm guessing maybe other people are running into the same issue I am. I have my UploadAttachment call working, but the result always comes back as XML instead of JSON. I think the problem is I don't know how to pass the parameters in the POST properly, since one of them specifies the response format. Below is what I'm currently sending in my POST. I'm sure there's something trivial I'm missing.

    Thanks!

    --EZY2eO_h7fJ_rwh7e2umpfepPPs5KSxxXxs
    Content-Disposition: form-data; name="UploadAttachment"
    Content-Type: application/json; charset=UTF-8
    Content-Transfer-Encoding: 8bit

    {method:"UploadAttachment", params: [{uploadfile:"/Users/mike/Downloads/Logo.png", output: "json"}]}
    --EZY2eO_h7fJ_rwh7e2umpfepPPs5KSxxXxs
    Content-Disposition: form-data; name="uploadedFile"; filename="Logo.png"
    Content-Type: application/octet-stream
    Content-Transfer-Encoding: binary

    ‰PNG
    \u001A
    0
    • Sep 2, 2012
    Hello,
    could you please post a complete request example of upload attachment :)
    please.

    QUOTE(Ram @ 5 Jan 2011 3:36 PM)
    Hi,

    I split your post from where it was previously for benefit of everyone. Please specify ?output=json in url request parameters. I guess it should work. Thanks.

    --R



    QUOTE (BoulderMike @ Dec 21 2010, 09:04 AM) <{POST_SNAPBACK}>
    Hello,

    Sorry to resurrect an old thread, but I'm guessing maybe other people are running into the same issue I am. I have my UploadAttachment call working, but the result always comes back as XML instead of JSON. I think the problem is I don't know how to pass the parameters in the POST properly, since one of them specifies the response format. Below is what I'm currently sending in my POST. I'm sure there's something trivial I'm missing.

    Thanks!

    --EZY2eO_h7fJ_rwh7e2umpfepPPs5KSxxXxs
    Content-Disposition: form-data; name="UploadAttachment"
    Content-Type: application/json; charset=UTF-8
    Content-Transfer-Encoding: 8bit

    {method:"UploadAttachment", params: [{uploadfile:"/Users/mike/Downloads/Logo.png", output: "json"}]}
    --EZY2eO_h7fJ_rwh7e2umpfepPPs5KSxxXxs
    Content-Disposition: form-data; name="uploadedFile"; filename="Logo.png"
    Content-Type: application/octet-stream
    Content-Transfer-Encoding: binary

    ‰PNG
    \u001A
    0

Recent Posts

in Yahoo! Mail Web Services API