Documentation

GridFS File Manager

GridFS

The GridFS Management activity provides comprehensive tools for managing files stored in MongoDB GridFS. Upload, download, preview, and manage large files with advanced filtering capabilities, metadata editing, and seamless integration with your MongoDB collections.

Quick Start

Get started with GridFS file management in VisualLeaf:

  1. Connect to a MongoDB database with GridFS collections (fs.files and fs.chunks)
  2. Select a GridFS bucket from the sidebar navigation tree
  3. Browse files using the file browser interface with sortable columns
  4. Upload new files, download existing ones, or preview supported file types
  5. Edit metadata, manage chunks, and export/import files as needed
Video GRID01 Uploading Files to GridFS - Upload workflow demonstration: 1) Navigate to GridFS bucket in sidebar (look for database with fs.files and fs.chunks collections), 2) Click GridFS bucket to open file browser interface, 3) Click "Upload" button or press Ctrl+U to open upload dialog, 4) Select files using file picker or drag-and-drop into upload zone (supports multiple files), 5) Review file list showing names, sizes, and auto-detected content types, 6) Optionally edit filenames or content types for each file, 7) Add custom metadata fields as JSON (e.g., category, author, description), 8) Configure chunk size if different from default 255KB, 9) Click "Upload" button to start, 10) Monitor individual progress bars for each file, 11) Verify uploaded files appear in file browser with correct metadata.
GridFS file browser showing file list with columns (filename, size, upload date, content type), toolbar with upload/download buttons, and search/filter controls

File Browser

The file browser provides an intuitive interface for navigating and managing files stored in MongoDB GridFS. View files in a sortable table with comprehensive metadata display.

File List Features

  • File Icons: Visual indicators for different file types (images, PDFs, documents, archives, etc.)
  • Sortable Columns: Click column headers to sort by filename, size, upload date, or content type
  • File Metadata: Display filename, size (with human-readable format), upload date, content type, and MD5 checksum
  • Multi-Select: Select multiple files for batch operations using checkboxes
  • Pagination: Navigate large file collections with configurable page size (50, 100, 200, 500 files per page)
  • Quick Actions: Context menu on each file for download, preview, edit metadata, or delete

File Information Display

Column Description Sortable
Filename Name of the file with icon indicating file type Yes
Size File size in human-readable format (KB, MB, GB) Yes
Upload Date Timestamp when file was uploaded to GridFS Yes
Content Type MIME type of the file (e.g., image/png, application/pdf) Yes
Chunk Size Size of each chunk (default 255KB) No
File list table with multiple files showing various file types (images, PDFs, documents) with complete metadata columns and checkbox selection

File Upload

Upload files to GridFS with automatic chunking, metadata assignment, and progress tracking. Supports single and batch file uploads.

Upload dialog showing file selection area with drag-and-drop zone, file list with progress bars, metadata fields, and upload button

Upload Options

  • File Selection: Choose files via file picker or drag-and-drop into upload zone
  • Batch Upload: Select and upload multiple files simultaneously
  • Progress Tracking: Individual progress bars for each file showing upload percentage
  • Automatic Chunking: Files automatically split into chunks (default 255KB per chunk)
  • Metadata Assignment: Add custom metadata fields during upload
  • Content Type Detection: Automatic MIME type detection with manual override option

Upload Configuration

Field Description Required
Filename Name to save file as in GridFS (defaults to original filename) Yes
Content Type MIME type of the file (auto-detected or manually specified) No
Chunk Size Size of each chunk in bytes (default 261120 / 255KB) No
Custom Metadata Additional metadata fields as JSON object No

File Download

Download files from GridFS storage while preserving original metadata and file properties. Supports single and batch downloads.

Single File Download

Click download button or use context menu to download individual files. File chunks are automatically reassembled and downloaded with original filename.

Batch Download

Select multiple files and download them as a ZIP archive. Files are organized and compressed for efficient download.

Copy File Link

Generate and copy shareable links to files (if exposed via web server). Useful for referencing files in applications.

Streaming Download

Large files are downloaded using streaming to prevent memory issues. Progress indicator shows download status.

File Preview

Preview supported file types directly in VisualLeaf without downloading. Includes image viewer, text editor, PDF viewer, and media player.

Video GRID05 Previewing and Downloading Files - Preview and download walkthrough: 1) Browse file list in GridFS browser with sortable columns (click headers to sort by filename, size, date, type), 2) Use search box (Ctrl+F) to find files by name or filter by content type using dropdown, 3) Double-click file or click preview icon to open preview modal, 4) For images: use zoom controls, pan, and rotation; view image dimensions and metadata, 5) For PDFs: navigate pages, use zoom/fit controls, search text within document, 6) For text files: view with syntax highlighting, search and word wrap, 7) For videos/audio: use playback controls, adjust volume, toggle fullscreen, 8) View metadata panel showing system fields (size, upload date, MD5) and custom metadata, 9) Click download button in preview or file list to save file locally (chunks reassembled automatically), 10) Select multiple files and click "Batch Download" to get ZIP archive, 11) Use context menu for additional actions (edit metadata, copy link, delete).
Preview modal showing an image file with zoom controls, metadata panel on the right, and navigation buttons to browse next/previous files

Supported Preview Types

Images

Preview images with zoom, pan, and rotation controls:

  • Formats: PNG, JPEG, GIF, WebP, SVG, BMP
  • Zoom in/out and fit-to-screen options
  • Image metadata display (dimensions, size, format)
  • Navigation between multiple images

PDF Documents

View PDF files with full navigation and search:

  • Page-by-page navigation
  • Zoom and fit controls
  • Text search within PDF
  • Page thumbnails sidebar

Text Files

Read and edit text-based files:

  • Formats: TXT, JSON, XML, CSV, Markdown
  • Syntax highlighting for code files
  • Search and replace functionality
  • Line numbers and word wrap

Media Files

Play audio and video files:

  • Video: MP4, WebM, OGG
  • Audio: MP3, WAV, OGG
  • Playback controls (play, pause, seek)
  • Volume control and fullscreen mode

Preview Features

  • Quick Preview: Double-click file or click preview icon to open preview modal
  • Metadata Panel: View file metadata alongside preview (size, upload date, content type, custom fields)
  • Navigation Controls: Browse next/previous files without closing preview
  • Download from Preview: Download button available in preview for quick file saving
  • Edit Metadata: Edit metadata directly from preview interface
  • Full Screen: Expand preview to full screen for detailed viewing

Metadata Editing

View and edit file metadata including system fields and custom metadata. Supports JSON-based metadata for flexible data storage.

Metadata editor showing system fields (read-only) at top and custom metadata editor with JSON tree view for adding/editing custom fields

System Metadata Fields

These fields are managed by GridFS and are read-only:

  • _id: Unique ObjectId identifier for the file
  • length: Total file size in bytes
  • chunkSize: Size of each chunk (default 255KB)
  • uploadDate: Timestamp when file was uploaded
  • md5: MD5 checksum for file integrity verification

Custom Metadata Fields

Editable fields for application-specific metadata:

  • filename: Name of the file (editable for renaming)
  • contentType: MIME type of the file
  • aliases: Array of alternative names or tags
  • metadata: JSON object for custom fields (category, author, description, etc.)

Metadata Operations

Edit Metadata

Click metadata icon or use context menu to open metadata editor. Modify custom fields using JSON tree editor with validation.

Add Custom Fields

Add new custom metadata fields to metadata object. Supports nested objects, arrays, and all BSON data types.

Copy Metadata

Copy metadata from one file and apply to others. Useful for batch metadata updates or template application.

Export Metadata

Export file metadata to JSON for documentation or backup. Import metadata from JSON files to restore or migrate.

Export & Import

Export files and metadata from GridFS or import files into GridFS collections with various format options.

Export Formats

ZIP Archive

Export selected files as ZIP archive with original filenames. Includes metadata.json file with file metadata.

Folder Structure

Export files preserving folder hierarchy based on metadata categories. Files organized in subdirectories.

BSON Dump

Export GridFS collections (fs.files and fs.chunks) as BSON for MongoDB backup or migration using mongodump format.

JSON Manifest

Export metadata only as JSON manifest file listing all files with metadata. Useful for inventory and documentation.

Import Options

  • Single File Import: Upload individual files through standard upload dialog
  • Batch Import: Import multiple files from local folder with preserve directory structure option
  • ZIP Import: Upload and extract ZIP archives automatically uploading all contained files
  • Metadata Import: Import files with metadata from JSON manifest for consistent metadata application
  • BSON Restore: Restore GridFS collections from BSON dump created by mongodump
Export configuration dialog showing format selection (ZIP/Folder/BSON), file selection with checkboxes, options for including metadata, and export button

Search & Filter

Find files quickly using advanced search and filtering capabilities with support for metadata queries.

Search Options

  • Filename Search: Search by filename with partial match and case-insensitive options
  • Content Type Filter: Filter files by MIME type or category (images, documents, videos, etc.)
  • Date Range Filter: Find files uploaded within specific date range
  • Size Filter: Filter by file size with min/max constraints
  • Metadata Query: Search custom metadata fields using MongoDB query syntax
  • Advanced Filter Builder: Visual query builder for complex metadata searches

Filter Presets

Quick filter buttons for common searches:

  • Recent Files: Files uploaded in last 24 hours, 7 days, or 30 days
  • Large Files: Files over 1MB, 10MB, or 100MB
  • By Type: Quick filters for Images, Documents, Videos, Archives
  • Custom Filters: Save frequently used filter combinations for quick access

Keyboard Shortcuts

Shortcut Action
Ctrl + U Open upload dialog
Ctrl + F Focus search box
Ctrl + A Select all files in current view
Delete Delete selected files (with confirmation)
Space Preview selected file
F5 Refresh file list

Note: On macOS, use Cmd instead of Ctrl

Common Use Cases

Media Asset Management

Store and manage images, videos, and audio files for web applications and content management systems. Preview media, edit metadata, and organize by custom categories.

Document Storage

Manage large documents, PDFs, and file attachments that exceed MongoDB's 16MB document size limit. Full-text search and version tracking via metadata.

Backup & Archive

Store database backups, log files, and archived data with metadata for easy retrieval. Export entire collections for disaster recovery.

Application Assets

Store application binaries, configuration files, and deployment artifacts. Version control through metadata and organize by release tags.

Pro Tips

  1. Use meaningful filenames and add descriptive metadata to make files easily searchable and identifiable in large collections.
  2. Create indexes on frequently queried metadata fields (like filename, uploadDate, contentType) to improve search performance.
  3. Monitor GridFS storage usage regularly and implement cleanup policies for old or unused files to manage disk space efficiently.
  4. Use batch operations for managing multiple files efficiently. Export to ZIP for backups and use metadata templates for consistent categorization.
  • Collection Activity - Query and manage fs.files and fs.chunks collections directly for advanced operations
  • Export Data - Export GridFS collections for backup or migration to other MongoDB instances
  • Index Management - Create indexes on metadata fields to improve search and query performance
  • Collection Statistics - View storage statistics and chunk distribution for GridFS collections

Ready to try VisuaLeaf?

Download and start managing your MongoDB databases with ease.

Download Free Trial