fs_file
This module provides a new field type FSFile for storing files in external filesystem storages instead of Odoo's filestore, optimized for large files with an interface for content and metadata access.
Key Features
- fs_file: Defines a new FSFile field type that stores files in external filesystem storages instead of Odoo's filestore.
- fs_file: Provides FSFileValue class for accessing file content and metadata including name, mimetype, size, and URLs.
- fs_file: Supports various input formats for file content including raw bytes, base64 encoded data, file-like objects, and dictionaries with filename and content.
- fs_file: Allows streaming file content to minimize memory consumption when handling large files.
- fs_file: Returns JSON structure with filename, mimetype, size, and URL for exchanging file information with external systems.
- fs_file: Ensures transactional behavior for file write operations to maintain data integrity.
- fs_file: Handles mimetype guessing from filename or file content when not explicitly provided.
- fs_file: Supports opening files as streams for efficient reading and writing without loading entire content into memory.
- fs_file: Manages cache invalidation and attachment records for proper field value handling.
- fs_file: Allows creation and handling of empty files with proper name preservation.