1️⃣: FILE & MEDIA MIME TYPE ANALYSER (FRONT-END & NATIVE MOBILE)
===========================================
📋 ELEMENT DESCRIPTION
--------------------------------
FILE & MEDIA MIME TYPE ANALYSER (FRONT-END & NATIVE MOBILE) provides the ANALYZE FILE action to detect file extensions, MIME types, and file sizes from various file sources. The front-end element is suitable for applications when reactivity is desired, such as but not limited to, mobile applications.
🔧 STEP-BY-STEP SETUP
--------------------------------
1) Add the FILE & MEDIA MIME TYPE ANALYSER (FRONT-END & NATIVE MOBILE) element to the page where you need file analysis capabilities.
2) Integrate the logic into your application using the following element's states and actions:
EVENTS:
- SUCCESS: Event triggered upon successful file analysis
- ERROR: Event triggered when an error occurs during analysis
EXPOSED STATES:
- EXTENSION: Returns the file's Extension
- MIME TYPE: Returns the file's MIME Type
- FILE SIZE (BYTES): Returns the file's size in bytes
- ERROR MESSAGE: Populated upon ERROR event with detailed error information
- IS PROCESSING: Set to true when processing is in progress, false otherwise
ELEMENT ACTIONS - TRIGGERED IN WORKFLOW:
- ANALYZE FILE (FRONT-END): Analyzes the provided file and populates the element's states with the results.
Inputs Fields:
- FILE URL: The URL of the file to analyze from the Bubble.io uploader, or a Protocol-relative URL (//server/file.ext), or a HTTPS URL (
https://server/file.ext).
2️⃣: ANALYZE FILE (BACK-END)
==================================
📋 ACTION DESCRIPTION
--------------------------------
ANALYZE FILE (BACK-END) returns the detected extension, MIME type, and size of the file provided as input. The back-end action is suitable for applications when asynchronous processing is desired.
🔧 STEP-BY-STEP SETUP
--------------------------------
1) Set up the "ANALYZE FILE (BACK-END)" action in your workflow.
Input Fields:
- FILE URL: The URL of the file to analyze from the Bubble.io uploader, or a Protocol-relative URL (//server/file.ext), or a HTTPS URL (
https://server/file.ext).
Output Fields:
- EXTENSION: Returns the file's Extension
- MIME TYPE: Returns the file's MIME Type
- FILE SIZE (BYTES): Returns the file's size in bytes
🔍 IMPLEMENTATION EXAMPLE
======================
Feel free to browse the app editor in the Service URL for an implementation example.
ℹ️ ADDITIONAL INFORMATION
======================
> List of supported file types:
https://github.com/sindresorhus/file-type#supported-file-types> MIME Type information:
https://en.wikipedia.org/wiki/Media_type⚠️ TROUBLESHOOTING
================
Any plugin related error will be posted to the Logs tab, "Server logs" section of your App Editor.
Make sure that "Plugin server side logging" and "Plugin client side logging" are selected in "Show Advanced".
For front-end actions, you can also open your browser's developer console (F12 or Ctrl+Shift+I in most browsers) to view detailed error messages and logs.
Always check the ERROR MESSAGE state of the element and implement error handling using the ERROR event to provide a better user experience.
> Server Logs Details:
https://manual.bubble.io/core-resources/bubbles-interface/logs-tab#server-logs⚡ PERFORMANCE CONSIDERATIONS
===========================
⏱️ BACK-END ACTION START DELAY
-----------------------------------------------
Each time a server-side action is called, Bubble initializes a small virtual machine to execute the action. If the same action is called shortly after, the caching mechanism kicks in, resulting in faster execution on subsequent calls.
A useful workaround is to fire a dummy execution at page load, which pre-warms the Bubble engine for the next few minutes, reducing the impact of cold starts for your users.
⏳ PROCESSING TIME LIMITATIONS
-----------------------------------------------
For back-end actions, the maximum processing duration is capped at 30 seconds as per Bubble.io design. This time limitation does not apply to front-end actions..
❓ QUESTIONS?
===========
Contact us at
bubble@wiseable.io for any additional feature you would require or support question.