Files component
The files component renders a complete and functional user interface for a file collaboration/storage with uploading, sharing, previewing, commenting and downloading of files.
Element: <wy-files>
Class: WyFiles
Usage
First import and configure Weavy
and the WyFiles
component.
import { Weavy, WyFiles } from "@weavy/uikit-web";
const weavy = new Weavy();
weavy.url = "https://myenvironment.weavy.io";
weavy.tokenFactory = async (refresh) => "token_from_server";
Then add the <wy-files>
component to your HTML. Note that you must specify a unique identifier (uid
) which automatically creates a corresponding app on your Weavy server when the component is first initialized.
<wy-files uid="test-files" name="Test files"></wy-files>
The unique identifier (
uid
) is something you decide what it should be. For apps it's often useful to have auid
that is related to the context where the app is displayed. For example"product-123-files"
or"customer-2-files"
.
Properties
Property | Type | Description |
---|---|---|
uid |
string |
Unique identifier for the app. |
name |
string |
Optional display name for the app (used in notifications etc.) |
notifications |
"button-list" | "none" |
Set the appearance of notifications. Defaults to "button-list" . |
notificationsBadge |
"count" | "dot" | "none" |
Set the appearance of the notification badge. Defaults to "count" . |
The available features are controlled by your product license. To disable a feature you can use the following boolean attributes/properties.
Property | Description |
---|---|
noAttachments |
Disable the possibility to upload local files. |
noCloudFiles |
Disable the cloud file picker (Google Drive, Dropbox etc.) |
noMentions |
Disable the possibility to mention other people in the directory in a file comment. |
noPreviews |
Disable previews of files. |
noReactions |
Disable the possibility to add emoji reactions to a file comment. |
noComments |
Disable comments on a file. |
noVersions |
Disable file versions. |
noWebDAV |
Disable webDAV functionality. |
Example: Disabling comments and reactions for files app.
<wy-files uid="test-files" noComments noReactions></wy-files>