FileThumbnail
Introduction
FileThumbnail widget in Supervisely displays an icon, link, and path to the file in Team Files. Clicking on the widget opens Supervisely Team Files interface, where you can view and edit the file.
Function signature
FileThumbnail(info=None, widget_id=None)
Parameters
info
FileInfo
Information about given file
widget_id
str
ID of the widget
info
Determine information about given file.
type: FileInfo
default value: None
widget_id
ID of the widget.
type: str
default value: None
Methods and attributes
set(info: FileInfo)
Set given FileInfo in FileThumbnail.
Mini App Example
You can find this example in our Github repository:
ui-widgets-demos/thumbnail/005_file_thumbnail/src/main.py
Import libraries
Init API client
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Prepare file and upload in Team files
Initialize FileThumbnail widget
FileThumbnail widgetCreate app layout
Prepare a layout for app using Card widget with the content parameter and place widget that we've just created in the Container widget.
Create app using layout
Create an app object with layout parameter.

Last updated
Was this helpful?