开发者

How to use Teambox REST API for uploading files

Below I am pasting content from Teambox api documentation:

htt开发者_JAVA技巧ps://teambox.com/api/upload

uploads#create POST

/api/1/projects/:project_id/uploads

/api/1/uploads

Creates a new upload. Note that you will need to post an upload using form encoding for this to work.

Parameters you should pass
{
  "page_id": 456,
  "project_id": 123,
  "name": "Name",
  "asset": "<File Data>"
}

Questions:

  1. What do we mean by upload using form encoding?
  2. What does asset: <File Data> represent?

Any code example would be great too. Thanks


Seems that you have to post data to teambox in your call.

How to use Teambox REST API for uploading files

POST is one of the methods commonly used by web forms, when passing data to a server. This "official" link tells what is what

First described manners describe a call thought as a GET request. Latest form you get takes the shape of a POST call.

You can build a POST call in many ways, depending on the native language your client app uses. If is a javascript based web app, you can use XHTTPRequest object which resides on browsers. If your app runs in a Linux based system, maybe you can use libraries that allow you build-up that call, such cURL library.

So, can you show the code or get deeper in your description? Would be nice to know your environment and programming language.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜