Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DiagramFile Storage

This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

Hierarchy

  • DiagramFile

A simple interface containing basic information about a diagram saved to a storage service. Guarantees the existence of file id, name, and path.

DiagramFiles are used as a minimal representation of files stored in data. GoCloudStorage.currentDiagramFile. GoCloudStorage.save, GoCloudStorage.load, GoCloudStorage.remove, and GoCloudStorage.create all return Promises which resolve with DiagramFiles containing minimal data about the saved / loaded / removed / created file in storage.

Index

Properties

Properties

The storage-given ID of the diagram file. This is usually a lengthy alphanumeric string.

Note: In the case of files saved to / loaded from Local Storage with GoLocalStorage, ID is the same as the name of the file.

The name of the diagram file in storage. This is assigned by the user during GoCloudStorage.save.

The path of the diagram file in storage. Rules for valid path syntax by subclass:

  • GoLocalStorage: Just the filename (the key in local storage); i.e. example.diagram
  • GoDropBox: /{path-to-file}/{filename}; i.e. /Public/example.diagram
  • GoGoogleDrive: Use Google Drive-given file IDs. Parameter is still called 'path' in GoGoogleDrive methods to preserve system nomenclature.
  • GoOneDrive: /drive/root:/{path-to-file}/{filename}; i.e. /drive/root:/Documents/example.diagram