MARKETPLACE
PLUGINS
FILE & MEDIA MIME TYPE ANALYSER
File & Media MIME Type Analyser logo

File & Media MIME Type Analyser

Published April 2021
   •    Updated this week

Plugin details

This plugin analyzes files provided as a file or URL, specifically examining their "magic number" (a small code within the file) to reliably detect file extensions (such as pdf) and MIME Types (application/pdf).
The following element is provided:
- FILE & MEDIA MIME TYPE ANALYSER (FRONT-END & NATIVE MOBILE)

The following actions are provided:
- ANALYZE FILE (FRONT-END & NATIVE MOBILE)
- ANALYZE FILE (BACK-END)

Demo link: https://filetypedetectordemo.bubbleapps.io/version-test

Editor Link: https://bubble.io/page?type=page&name=index&id=filetypedetectordemo&tab=tabs-1

💡 𝗦𝘂𝗯𝘀𝗰𝗿𝗶𝗽𝘁𝗶𝗼𝗻𝘀 𝗮𝗿𝗲 𝗽𝗿𝗼𝗿𝗮𝘁𝗲𝗱. 𝗜𝗳 𝘆𝗼𝘂 𝗶𝗻𝘀𝘁𝗮𝗹𝗹 𝗮𝗻𝗱 𝘂𝗻𝘀𝘂𝗯𝘀𝗰𝗿𝗶𝗯𝗲 𝘁𝗵𝗶𝘀 𝗽𝗹𝘂𝗴𝗶𝗻 𝗶𝗻 𝗼𝗻𝗲 𝗱𝗮𝘆 𝘁𝗼 𝘁𝗲𝘀𝘁 𝗶𝘁 𝗼𝘂𝘁, 𝘆𝗼𝘂'𝗹𝗹 𝗼𝗻𝗹𝘆 𝗯𝗲 𝗰𝗵𝗮𝗿𝗴𝗲𝗱 𝟭/𝟯𝟬𝘁𝗵 𝗼𝗳 𝘁𝗵𝗲 𝗺𝗼𝗻𝘁𝗵𝗹𝘆 𝘀𝘂𝗯𝘀𝗰𝗿𝗶𝗽𝘁𝗶𝗼𝗻 𝗳𝗲𝗲.

📖 𝗦𝘁𝗲𝗽-𝗯𝘆-𝗦𝘁𝗲𝗽 𝗶𝗻𝘀𝘁𝗿𝘂𝗰𝘁𝗶𝗼𝗻𝘀 𝗮𝗿𝗲 𝘁𝗵𝗲 "𝗜𝗻𝘀𝘁𝗿𝘂𝗰𝘁𝗶𝗼𝗻𝘀" 𝘀𝗲𝗰𝘁𝗶𝗼𝗻 𝗮𝗻𝗱 𝗗𝗲𝗺𝗼 𝗘𝗱𝗶𝘁𝗼𝗿 𝗶𝘀 𝗶𝗻 𝘁𝗵𝗲 "𝗟𝗶𝗻𝗸𝘀" 𝘀𝗲𝗰𝘁𝗶𝗼𝗻 𝗼𝗳 𝘁𝗵𝗲 𝗣𝗹𝘂𝗴𝗶𝗻 𝗣𝗮𝗴𝗲.

Contact us at [email protected] for any additional feature you would require or support question.

$15

One time  •  Or  $5/mo

stars   •   0 ratings
185 installs  
This plugin does not collect or track your personal data.

Platform

Web & Native mobile

Contributor details

wise:able logo
wise:able
Joined 2020   •   122 Plugins
View contributor profile

Instructions

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 [email protected] for any additional feature you would require or support question.

Types

This plugin can be found under the following types:
Element   •   Event   •   Action

Categories

This plugin can be found under the following categories:
Media   •   Technical   •   Data (things)   •   Image   •   Video   •   Visual Elements

Resources

Support contact
Documentation
Tutorial

Rating and reviews

No reviews yet

This plugin has not received any reviews.
Bubble