✨ Feature Request
Description
Currently, the file browser and file selection in the inline editor only supports image files. Users cannot select or link other file types such as documents, PDFs, presentations, spreadsheets, or other non-image assets. This severely limits the functionality for users who need to manage document libraries, resource collections, or mixed media content.
Current Limitation
- ❌ Can only select image files (jpg, png, gif, etc.)
- ❌ Documents (PDF, DOCX, XLSX, PPTX) are not selectable
- ❌ Other files (ZIP, CSV, TXT, etc.) cannot be linked
- ❌ File browser filters out non-image content
Proposed Enhancement
Enable full file type support in the file browser and selection interface, allowing users to link and manage any file type stored in Directus.
Use Cases
-
Document Management
- Link technical documentation (PDF)
- Attach contracts or agreements
- Reference user manuals
-
Resource Libraries
- Educational materials (PPTX, DOCX)
- Downloadable templates (XLSX)
- Code snippets or scripts (JS, PY)
-
Mixed Media Projects
- Marketing materials (AI, PSD, SKETCH)
- Video files (MP4, MOV)
- Audio files (MP3, WAV)
-
Data Files
- CSV exports/imports
- JSON configuration files
- XML data files
Implementation Requirements
File Type Detection
// Current (limited)
const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'svg', 'webp'];
// Proposed (comprehensive)
const fileCategories = {
images: ['jpg', 'jpeg', 'png', 'gif', 'svg', 'webp', 'bmp', 'ico'],
documents: ['pdf', 'doc', 'docx', 'odt', 'rtf', 'txt'],
spreadsheets: ['xls', 'xlsx', 'csv', 'ods'],
presentations: ['ppt', 'pptx', 'odp'],
archives: ['zip', 'rar', '7z', 'tar', 'gz'],
videos: ['mp4', 'avi', 'mov', 'wmv', 'webm'],
audio: ['mp3', 'wav', 'ogg', 'flac', 'm4a'],
code: ['js', 'ts', 'py', 'java', 'cpp', 'html', 'css', 'json', 'xml'],
design: ['psd', 'ai', 'sketch', 'figma', 'xd']
};
function getFileType(filename) {
const ext = filename.split('.').pop().toLowerCase();
for (const [category, extensions] of Object.entries(fileCategories)) {
if (extensions.includes(ext)) return category;
}
return 'other';
}
Display Components
File Icon Mapping
const fileIcons = {
pdf: 'picture_as_pdf',
doc: 'description',
docx: 'description',
xls: 'table_chart',
xlsx: 'table_chart',
ppt: 'slideshow',
pptx: 'slideshow',
zip: 'folder_zip',
default: 'insert_drive_file'
};
File Preview Component
<template>
<div class="file-preview">
<div v-if="isImage" class="image-preview">
<img :src="fileUrl" :alt="file.filename_disk" />
</div>
<div v-else class="file-icon-preview">
<v-icon :name="getFileIcon(file.type)" large />
<div class="file-info">
<span class="filename">{{ file.filename_download }}</span>
<span class="file-size">{{ formatFileSize(file.filesize) }}</span>
<span class="file-type">{{ file.type.toUpperCase() }}</span>
</div>
</div>
</div>
</template>
User Interface Enhancements
File Browser Improvements
┌────────────────────────────────────────┐
│ Select File │
├────────────────────────────────────────┤
│ Filter: [All Files ▼] │
│ • All Files │
│ • Images │
│ • Documents │
│ • Spreadsheets │
│ • Presentations │
│ • Archives │
│ │
│ Files: │
│ ┌──────┐ ┌──────┐ ┌──────┐ │
│ │ 📄 │ │ 📊 │ │ 🖼️ │ │
│ │ PDF │ │ XLSX │ │ JPG │ │
│ └──────┘ └──────┘ └──────┘ │
│ report budget photo │
│ .pdf .xlsx .jpg │
│ 2.3 MB 156 KB 3.1 MB │
│ │
│ [Cancel] [Select] │
└────────────────────────────────────────┘
Cell Display for Files
- Show file icon based on type
- Display filename (truncated if needed)
- Optional: Show file size
- Click to download or preview
Technical Implementation
Components to Update
src/components/FileBrowserContent.vue - Remove image-only filter
src/components/EditableCellRelational.vue - Support all file types
src/components/CellRenderers/ImageCell.vue - Rename to FileCell.vue or create new
New Features Needed
- File Type Icons: Map file extensions to appropriate icons
- File Info Display: Show name, size, type in cells
- Preview Options: Different preview for different file types
- Filter System: Allow filtering by file type in browser
- Download Links: Enable file downloads from table
Configuration Options
// Layout options
{
fileDisplay: {
showIcon: true,
showFilename: true,
showSize: false,
showType: false,
truncateLength: 30,
allowDownload: true,
allowPreview: true
},
fileTypeFilters: ['all', 'images', 'documents', 'custom...'],
supportedExtensions: ['*'] // or specific list
}
Benefits
- Complete Asset Management: Handle all file types, not just images
- Document Workflows: Support for document-centric applications
- Flexibility: One field type for all file needs
- Consistency: Unified interface for all file types
- Professional Use: Essential for business applications
Acceptance Criteria
Priority
High - This is a critical feature gap that limits the extension's usefulness for many common business scenarios where document management is essential.
Additional Considerations
- Security: Respect Directus file permissions
- Performance: Lazy load file information
- Accessibility: Proper ARIA labels for file types
- Mobile: Touch-friendly file selection
- Drag & Drop: Support for file uploads
- Bulk Operations: Select multiple files
Note: This enhancement would make the Super Table extension suitable for a much wider range of use cases, particularly document management systems, resource libraries, and mixed-media content management.
✨ Feature Request
Description
Currently, the file browser and file selection in the inline editor only supports image files. Users cannot select or link other file types such as documents, PDFs, presentations, spreadsheets, or other non-image assets. This severely limits the functionality for users who need to manage document libraries, resource collections, or mixed media content.
Current Limitation
Proposed Enhancement
Enable full file type support in the file browser and selection interface, allowing users to link and manage any file type stored in Directus.
Use Cases
Document Management
Resource Libraries
Mixed Media Projects
Data Files
Implementation Requirements
File Type Detection
Display Components
File Icon Mapping
File Preview Component
User Interface Enhancements
File Browser Improvements
Cell Display for Files
Technical Implementation
Components to Update
src/components/FileBrowserContent.vue- Remove image-only filtersrc/components/EditableCellRelational.vue- Support all file typessrc/components/CellRenderers/ImageCell.vue- Rename toFileCell.vueor create newNew Features Needed
Configuration Options
Benefits
Acceptance Criteria
Priority
High - This is a critical feature gap that limits the extension's usefulness for many common business scenarios where document management is essential.
Additional Considerations
Note: This enhancement would make the Super Table extension suitable for a much wider range of use cases, particularly document management systems, resource libraries, and mixed-media content management.