Wait for device connection -> Web-Based File Browser

Web-Based File Browser

Summary

The Web-Based File Browser is a powerful tool that allows you to view, create, rename, delete, upload, and download files and folders on your connected device. It provides a familiar interface similar to a desktop file manager, making it easy to navigate and manage your device's file system remotely. This page is only accessible when you are actively connected to a device.

Page Access

You can access this page by navigating to: /devices_filebrowser

Page Functionalities

Top Bar

  • "Level Up" Button (Up Arrow Icon): Moves you one directory level higher in the file system.
  • Current Path Display: Shows the name of the current folder you are in. Hovering over it reveals the full path.
  • "Admin User" Toggle (Shield Icon): Activates or deactivates administrator privileges for your session, allowing access to protected files and directories. The icon changes color when active or hovered over.
  • "Create New File" Button (File with Pencil Icon): Opens a dialog to create a new file. You can specify the file name and choose from common file types or enter a custom one.
  • "Create New Folder" Button (Folder with Plus Icon): Opens a dialog to create a new folder in the current directory.
  • "Upload" Button (Up Arrow in Box Icon): Opens a dialog to upload one or more files from your local computer to the current directory on the device.

File and Folder List

  • Displays all files and folders in the current directory.
  • Each item shows its name, type (folder or file icon), and size.
  • Clicking on a folder navigates into that folder.
  • Clicking on an editable file opens it in the file editor.
  • Three-Dot Menu (Vertical Ellipsis Icon): Appears next to each file and folder (unless on a shared "demodevice") to provide additional actions:
    • For Files:
      • Edit: Opens the file in an editor (only for supported file types).
      • Download: Downloads the file to your local computer.
      • Rename: Allows you to change the file's name.
      • Delete: Prompts for confirmation before deleting the file.
    • For Folders:
      • Download folder as ZIP file: Downloads the entire folder and its contents as a compressed ZIP file.
      • Rename: Allows you to change the folder's name.
      • Delete: Prompts for confirmation before deleting the folder (the folder must be empty).

Loading Indicators

  • Circular Progress Indicator: Appears when the file browser is initially loading data.
  • Linear Progress Bar: Shown during file uploads and downloads to indicate progress.

Info Banners

  • Permission Error Banner: Appears if the current folder is not readable due to permission issues.
  • Shared Device Banner: Informs you if you are browsing a shared device (some actions might be restricted).

Scenario Executions

Possible usage steps within this page

  1. Navigating Directories:
    • Goal: Explore the device's file system.
    • Steps:
      • Upon loading the file browser, you see the contents of the root directory.
      • Click on a folder name (e.g., "my_documents") to enter it.
      • Click the "Level Up" button (up arrow icon) to move back to the parent directory.
      • The "Current Path Display" updates to reflect your location.
  2. Creating a New Folder:
    • Goal: Organize files by creating a new directory.
    • Steps:
      • Click the "Create New Folder" button (folder with plus icon) in the top bar.
      • A dialog appears asking for the folder name.
      • Type a name (e.g., "my_new_project") into the text field and click "Create".
      • The new folder will appear in the current directory list.
  3. Creating a New Editable File:
    • Goal: Create a new text file to write code or notes.
    • Steps:
      • Click the "Create New File" button (file with pencil icon) in the top bar.
      • A dialog appears asking for the file name and type.
      • Type a name (e.g., "script") and select a file type from the dropdown (e.g., "sh" for a shell script).
      • Click "Create".
      • The file will be created and automatically opened in the file editor for you to start writing.
  4. Uploading a File:
    • Goal: Transfer a local file to your device.
    • Steps:
      • Click the "Upload" button (up arrow in box icon) in the top bar.
      • A dialog appears. Click "Select Files to Upload".
      • Your computer's file explorer opens. Select one or more files (e.g., "my_config.txt") and confirm.
      • The files will appear in the upload dialog with individual progress bars. Once finished, they will appear in the file browser list.
  5. Editing an Existing File:
    • Goal: Modify the content of a file on your device.
    • Steps:
      • Locate an editable file (e.g., "settings.yaml") in the file list.
      • Click the three-dot menu next to it and select "Edit".
      • The file will open in the integrated file editor, allowing you to make changes.
  6. Downloading a File:
    • Goal: Get a copy of a file from your device to your local computer.
    • Steps:
      • Locate the desired file (e.g., "log.txt") in the file list.
      • Click the three-dot menu next to it and select "Download".
      • A download process will start, and the file will typically appear in your browser's "Downloads" folder.
  7. Downloading a Folder as ZIP:
    • Goal: Download an entire directory and its contents as a single compressed file.
    • Steps:
      • Locate the desired folder (e.g., "backup_data") in the file list.
      • Click the three-dot menu next to it and select "Download folder as ZIP file".
      • A download process will start, and a ZIP archive of the folder will be saved to your local computer.
  8. Renaming a File or Folder:
    • Goal: Change the name of a file or folder.
    • Steps:
      • Locate the file or folder you want to rename.
      • Click the three-dot menu next to it and select "Rename".
      • A dialog will appear with the current name. Type the new name (e.g., "new_name.txt" or "updated_folder") and click "Rename".
  9. Deleting a File:
    • Goal: Permanently remove a file from your device.
    • Steps:
      • Locate the file you want to delete.
      • Click the three-dot menu next to it and select "Delete".
      • A confirmation dialog appears. Type "delete" into the text field and click "Delete" to confirm.
  10. Activating Administrator Privileges:
    • Goal: Gain elevated permissions to access restricted areas of the file system.
    • Steps:
      • Click the "Admin User" toggle (shield icon) in the top bar.
      • The icon's color will change to indicate that administrator privileges are active. You can now try to access protected folders.
      • Click it again to deactivate administrator privileges.

Possible errors which may occur on this page

  1. Permission Problem: Could not change to directory:
    • Why it happens: You tried to enter a folder (or perform an action within it) that your current user account (or the active administrator privileges) does not have permission to read or modify.
    • What you see: A red error message "Permission problem: could not change to [directory name]" appears at the bottom of the screen.
    • How to resolve:
      • Ensure you have activated "Admin User" privileges from the top bar if you intend to access system-level directories.
      • If the issue persists even with admin privileges, the directory might be entirely restricted or corrupted.
  2. Folder is not readable (permission issue) banner:
    • Why it happens: When you navigate to certain directories, the system detects that the current user lacks the necessary permissions to view its contents, even if you could enter the directory itself.
    • What you see: A grey banner at the top of the file list with a lock icon and the text "Folder is not readable (permission issue)". The file list below it will be empty or incomplete.
    • How to resolve: Activate "Admin User" privileges from the top bar and try again.
  3. Error loading file browser:
    • Why it happens: There was a general communication error with the device, or the device went offline while the file browser was trying to fetch file system data.
    • What you see: A full-page error message with an "Error" icon and "Error loading file browser" text, along with a "Try again" button.
    • How to resolve: Check your device's connection and power status. Then, click "Try again" to refresh the file browser.
  4. Device is not online:
    • Why it happens: The device you were connected to has gone offline, or the connection was interrupted.
    • What you see: A full-page message stating "Device is not online - Please ensure that the device is running and press the button." along with a "Try Again" button.
    • How to resolve: Verify that your physical device is powered on, connected to its network, and operational. Once confirmed, click "Try Again".
  5. Failed to delete the directory / file:
    • Why it happens:
      • For directories: You attempted to delete a folder that is not empty.
      • For files/directories: You do not have sufficient permissions, or there was a temporary communication issue.
    • What you see: A red error message "Failed to delete the directory" or "Failed to delete the file" at the bottom of the screen.
    • How to resolve:
      • For directories: Ensure the directory is empty before attempting to delete it. Delete all files and subfolders within it first.
      • For files/directories: Activate "Admin User" privileges and retry the deletion. If the problem persists, refresh the page and try again.
  6. Upload failed (file size limit reached / missing permission for large file upload):
    • Why it happens:
      • The file you are trying to upload exceeds the maximum size allowed by your license (File size is above the allowed limit of X mb).
      • You do not have the necessary S3 storage configuration or permissions set up for large file uploads (Missing permission for large file upload).
    • What you see: The file in the upload dialog will show a red progress bar and an error message indicating the specific reason.
    • How to resolve:
      • Size limit: If the file is too large, you may need to compress it or upload smaller parts. Check your account's license limits.
      • Missing S3 permission: Click the "Set permission" button within the upload dialog, which will guide you to configure your S3 storage. After configuration, click "Try again" for the failed upload.