File Uploader

Overview

The File Uploader provides a simple web-based user interface for uploading new files to the system, and for sharing them across the different communities.

Currently the main uses for file sharing in Community Edition (CE) are:

The share interface is completely generic, and widgets can be developed that allow communities of users to share app-specific binary and text files between them. 

Authorization Requirements:

You can share files with any available community. If you upload to only your personal community, only you (and system administrators) will have access to the file.

Using the File Uploader

Logging In

The File Uploader shares its cookie with the CE GUI, the Widget Uploader, the Source Builder User Interface, and the People Manager - logging into any of them will log into all of them.

To login

  •  Provide your credentials when prompted by any of the above mentioned GUIs.

Root URL Access

The File Uploader can be accessed from the root URL, by using the following formatting:

<ROOT_URL>/manager/fileUploader.jsp

eg http://infinite.ikanow.com/manager/fileUploader.jsp). 

This brings up username and password fields and a login button.

In order to login with admin privileges (for admins only!), append "?sudo"or "?sudo=true" to the URL (eg http://infinite.ikanow.com/manager/fileUploader.jsp?sudo).

Authorization Requirements:

If you are not logged-in with admin privileges you will only be able to edit your own files, though you will still be able to share files with any communities of which you are a member.  This is different to both source management and widget uploading, where you must be a community moderator/owner.

 


Filtering

You can filter to only certain file types using "?ext=<type>",

 where <type> is either "jar" or a MIME type (eg "pdf" for "application/pdf").

 The GUI also provides a drop down for performing this from the set of available source or MIME types.

 The "?ext=<type>" URL parameter can be used to filter on file type (or use the filter drop down menu).

 By way of example, consider the following screen capture:

 

 

Here we have filtered to only show files with MIME type "x-shockwave-application", and only the SWFs are shown. Conversely, using "ext=gif" would have restricted the drop down to show only the icon files.

 Currently, the most common usage will be "ext=jar" ("jar" is a special string defined for this tool), to view Hadoop plugins.

There is currently no way of explicity endorsing/unendorsing shares from this GUI. As a workaround, you can unshare the source from the desired community, and then re-share it.

Authorization Requirements:

Requires administrator or community moderator permissions.

 


Uploading a New Binary File

You can use the File Uploader to upload binary file types (anything other than JSON).

To upload the file,

  1. From the File Uploader web page, leave "Filter On" blank.
  2. Ensure that the Action dropdown is set to "Upload New File."
  3. Provide a Title, Description, and applicable Communities.  You can use CTRL+click to share with multiple Communities.

    4.Select the file from your hard drive/network drives, and click on Submit.

The system will automatically detect the MIME type.  The stored MIME type is used for filtering and for the content-type for when that file is served from the REST API.

 


Uploading a New JSON File

You can use the File Uploader to upload JSON files.

Community Edition handles JSON with some additional support, and there is an additional field "Type" that can be any string value.

This type is used in a few different ways:

  • It can be filtered on from the "Filter On" drop down menu in this GUI
  • It can be used as an efficient search object in the Social - Share - Search API call.
  • Shares of type "infinite-entity-alias" are used by the framework for aliasing.
  • Shares of type "source_template" are used by the Source Editor GUI as shareable templates.
  • Shares of type "widgetsave" are used the main GUI to store per-user or per-community settings
    • developer info here (uses map widget KML layers as an example)
  • Any other CE application can use it for internal purposes

To upload the JSON file

  1. Select "Upload New JSON" (instead of "Upload New File").  
  2. Specify the Type field as appropriate.
  3. Fill in the other fields as per binary file types.  The JSON is checked on ingest and an error thrown if it is invalid.

 


Sharing an Existing (JSON) Object

JSON objects from various internal databases can be shared to communities.  When sharing to communities you must specify the type field, as when uploading a JSON file, as well as reference informaton.

To share an existing JSON object

  1. From the Actions dropdown, select "Share existing object". 
  2. Configure the Type field as required.  For more information, see File Uploader Interface.
  3. Configure "Reference location" and "Reference doc id" as described below.
  4. Click on Submit.

Reference location

A reference location dropdown is displayed when sharing a JSON object.  The dropdown allows you to specify the appropriate Collection:

  • Custom Plugin Collection: the first object from this custom job is shared
  • Document Metadata Collection: the document with the specified "_id" field is shared
  • Aggregated Entity Collection: the entity object with the specified "_id" field is shared
  • Aggregated Association Collection: the association object with the specified "_id" field is shared
  • Local files 

Reference doc id

The Reference doc id field is displayed when sharing a JSON object.  This field must contain the "_id" field of the object chosen above.

 


Creating Shares Pointing to the Local File System

It is possible to create shares that return the local files as binary or JSON shares.

This can be used to "publish" common local files but with security restrictions.

Only administrators can use this function.

On multi-node clusters, the same version of the file must be present on all nodes or unpredictable behavior will ensue.

 

To create local file system shares

  1. From the actions dropdown select "share existing object."
  2. For Type select "binary" as the type if the object is not JSON
  3. For reference location select "Local File (admin only)"
  4. For Reference doc id  select the absolute path of the file to be shared.

This provides non-admin users who belong to the shared communities with (read only) access rights to that file.

Editing Existing Shares

Authorization Requirements:

After log-in, all files you own can be seen from the top drop-down menu (initially called "Upload New File").

If you are a community owner or moderator, all files in your communities can be seen in addition. 

If you an administrator, all files in the system can be seen. 

To edit the share

  1. Select the file to be modified from the "Upload New file" dropdown.
  2. Change the fields as required (eg. change communities), and then click on Submit.



Deleting Files

You can use the File Uploader interface to delete files.

To delete a file

  1. From the "Upload new file dropdown" select the file to be deleted.
  2. Click on Delete.

In this section:


 

Related Reference Documentation:

File Uploader Interface