How It Works:
The File Metadata Extractor plugin extracts metadata based on the type of file (video, audio, or image). It automatically detects the file type and retrieves the following information:
Supported File Types:
Video Files:
.mp4
,.webm
,.ogg
Audio Files:
.mp3
,.wav
,.ogg
Image Files:
.jpg
,.jpeg
,.png
,.gif
,.bmp
,.webp
π¦ Metadata Extracted:
π₯ For Video and Audio Files:
Duration: Retrieves the duration of video or audio content.
File Size: Fetches the size of the file in bytes.
File Type: Identifies the type of file (e.g., mp4, mp3).
πΌοΈ For Image and Video Files:
Height & Width: Extracts the dimensions of the file, useful for managing image or video content.
File Size: Fetches the size of the image or video file in bytes.
Plugin Workflow:
File Type Detection: The plugin validates the file type from the URL provided. It supports video, audio, and image file types.
Metadata Extraction:
For video files, it retrieves duration, width, and height.
For audio files, it retrieves the duration.
For image files, it retrieves the width and height.
File Size Retrieval: For all file types, the file size is fetched by making a
HEAD
request to the file URL.Events: The plugin triggers a
metadataReady
event when the data is successfully retrieved, making it easy to integrate with your app's workflow.
Usage:
Add the File Metadata Extractor element to your Bubble page.
Provide the File URL as a property.
The plugin will return metadata like file size, type, dimensions, and duration when applicable.
Use the event
metadataReady
to execute actions once the metadata is available.