Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

com_vuzit_Document_upload

bmatzelle edited this page · 3 revisions

com.vuzit.Document.upload function

Uploads a document to the Vuzit web service.

Signatures

Parameters

Static methods for the class.

  • String path : Path to a file on the file system.
  • InputStream stream : File stream of the file if you want to upload the file via a stream such as a file from a database. The “fileType” flag is required so that Vuzit knows how to handle the data.
  • OptionList options : Options for the uploaded file. See “Options” below.

Options

Options for the array.

  • download_document – bool : Specifies if the original document (such as a DOC, XLS, PDF, PPT file) is downloadable via the viewer control bar. The value is either “true” or “false”.
  • download_pdf – bool : Specifies if the generated PDF file, if the originating document was not a PDF, is downloadable via the viewer control bar. The value is either “true” or “false”.
  • secure – bool : Specifies whether the document should be public or private. The value is either “true” or “false”.
  • file_type – string : The short extension of the file type of the document to be uploaded (e.g. pdf, doc, ppt, etc.) This parameter is required if the file does not have an extension in the filename, and specifying this parameter overrides any existing extension that appears in the filename.
  • file_name – string : Name of the file (used only by the InputStream version).

Return type

  • Document : The new document with an ID. None of the other properties will be available. You’ll need to use the find method to load them.

Usage Example


com.vuzit.Service.getPublicKey("YOUR_PUBLIC_API_KEY");
com.vuzit.Service.getPrivateKey("YOUR_PRIVATE_API_KEY");

com.vuzit.Document doc = com.vuzit.Document.upload("c:/path/to/document.pdf");  

System.out.println("Document id: " + doc.getId());

Something went wrong with that request. Please try again.