api icon indicating copy to clipboard operation
api copied to clipboard

Try a upload, cant get it work.

Open DoeEensGek opened this issue 9 years ago • 2 comments

Hi there, i'm trying to use the upload api but couldnt get it worked. Can someone help me. My code looks now like this: Set FILE=C:\Users\..\Documents\..\tmp\tmp.jpg Set CLIENT-ID=.. Set OAUTH-TOKEN=.. call :setsize %FILE% curl -h "X-Access-Token: %OAUTH-TOKEN%" -H "X-Client-ID: %CLIENT-ID%" -H "file_name: tmp.jpg" -h "file_size: %SIZE%" -d "@%FILE%" -H "Content-Type: application/json" -H "content_type: image/jpg" -X POST https://a.wunderlist.com/api/v1/uploads

Tried everything I know, but nothing worked, always a 400 :(. Using curl on a windows desktop.

DoeEensGek avatar Nov 03 '15 17:11 DoeEensGek

  • 1 , we need better documentation stating how to achieve this whole complex flow.

vikramvi avatar Dec 29 '15 14:12 vikramvi

curl -d '{"file_name":"image_lv.png", "file_size":32000, "content_type":"image/png"}' -H "Content-Type: application/json" -H "X-Access-Token: [YOUR_ACCESS_TOKEN]" -H "X-Client-ID: [YOUR_CLIENT_ID]" -X POST https://a.wunderlist.com/api/v1/uploads

Response

{  
  "id":194995777,
  "user_id":83893571,
  "state":"new",
  "type":"upload",
  "expires_at":"2018-05-18T10:15:23.609Z",
  "part":{  
    "url":"https://upload.wunderlist.io/9a28bb30-3cb1-0136-bc97-22000a5bc116-1526638223-561467?partNumber=1&uploadId=_FK8Y3M0ljnCJfng4GfieQD6ihmj5DivjhZ8XJdjCe9TxLKMBxyP7.UGHYfbqG4CzJ_b1wmE99ydqwtJVKyTLhoHbx2.jo.Y5zI2USrgPldmstGsqff_2GcbLs4Xkume",
    "date":"Fri, 18 May 2018 10:15:23 UTC +00:00",
    "authorization": "AWS SOME-KEY-HERE:SOME-SIGNATURE-HERE"
  }
}

qadirsuh avatar May 18 '18 10:05 qadirsuh