Upload Document
edocr Upload Document method involves POSTing the parameters along with the document file to the specified URL. The signature generation for the authentication of this method should include all the parameters except the document parameter.

Uploading

Documents must be posted to the following URL.

http://www.edocr.com/api/upload


Authentication

This method requires authentication.

Parameters

  • document: The document file which is to be uploaded. It should be a document of the permitted file format within the allowed file size limit.
  • title: Title of the document
  • tags: Tags for the document
  • description: Description of the document in not less than 10 words
  • groups (optional): Comma separated group-ids (gid) of the groups to which the document is to be added. The calling user must be a member of the group to add documents to it.
  • category (optional): Id of the category to which the document is to be added.

Response

{"status":"ok","docid":98,"url":"http://www.edocr.com/doc/1/foo"}

Error Codes

  • 01: Service not available
  • 02: OAuth version not supported
  • 03: OAuth signature method not supported
  • 04: Invalid consumer key
  • 05: Invalid consumer
  • 07: Invalid access token
  • 08: Invalid signature
  • 09: OAuth timestamp difference is greater than threshold
  • 13: Invalid access token or the user hasn't authorized the token yet
  • 30: Zero byte file
  • 31: File too large
  • 32: Not a permitted file type
  • 33: No title found
  • 34: No tag found
  • 35: Description too short
     
    FOLLOW US ON
    Privacy Policy | Terms & Conditions
     
    © 2007 - 2012 All Rights Reserved