bmatzelle edited this page Sep 13, 2010 · 3 revisions

com.vuzit.Document.upload function

Uploads a document to the Vuzit web service.



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 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.Document doc = com.vuzit.Document.upload("c:/path/to/document.pdf");  

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