Cloudmersive API Suite
Overview
Documentation
The Cloudmersive API Suite is a utility API platform for your app. Implementation and setting up a FREE sign-up can be done within 5 minutes. You can take advantage of all of Cloudmersive’s APIs with one plan and pricing model and get end-to-end support and services.
Versions
Version 1.1
Key features
- Scan files for viruses, convert documents, generate PDF and Word files, resize and manipulate images
- Free & easy sign-up to Cloudmersive
- Easy integration in your project with reusable components
- Example workflows and use cases for smart automation of your app
- Easily extendable with new features
Current release
- Virus scan of files
- Image recognition and processing lets you use machine learning and other techniques to recognize and process images and perform image modification operations
- PDF generation based on Word templates
- Content moderation: moderate content including images and files for not-safe-for-work content (NSFW filter)
- Easy generation of Word Documents/PDFs based on templates
Which APIs are now included?
This version includes the following APIs:
- Detect file types
- Scan files on viruses, malware, spyware and various other threats
- Convert files to PDF
- Convert images to the filetype of your choice
- Check images on NSFW content
- Detect number of people in images
- Normalize images
- Rotate images
- Resize images
- Detect age of person in image
- Detect gender of person in image
- Crop a person’s head out of image
- Get text from image
- Live preview of files in module by HTML embed
- Token replacer for Word files
Future release (can be added by a Mendix developer as well)
- Documents and data conversion: automated file conversion processes for all popular file formats: HTML, PDF, DOCX, PNG, HEIC, CSV, PPTX, JSON, RTF, and TXT among others
- Receipt scanning and business data extraction: extract business data from photos
- Content moderation: website URL malware scan
- Convert, encode, and transcode videos
- Speech-to-text
Typical usage scenario
Scan files for potential threats such as viruses, ransomware, spyware etc., file conversion or photo editing. Similar use cases that can be computationally demanding for your app can be outsourced.
Features and limitations
Most API features have already been implemented. However, Cloudmersive is continuously adding new features which can be easily added to the module. If you are planning on adding microflows for new API features yourself, then those should be added in your own project instead of in the Cloudmersive module.
Installation
Follow these steps to get started in under 5 minutes:
- Download the Cloudmersive API Suite from the Mendix App Store.
- Read the provided documentation in the Mendix App Store carefully.
- Create a new navigation item and a page called Cloudmersive_Overview. On this page, you should add the SNP_Dashboard snippet.
- Assign the Cloudmersive module roles to the appropriate project roles on the 'Security' pane. Read the module role description to assign the appropriate roles to your project roles, which will depend on your use case.
- In the Mendix Modeler, navigate to the project explorer and go to 'Project', 'Settings', 'Runtime' and select the 'ASu_Cloudmersive' microflow as your after startup microflow. If you already have an after startup microflow configured, then add the 'ASu_Cloudmersive' microflow to your existing logic as a subflow.
- If your project contains specializations of the 'FileDocument' entity or the 'Image' entity and you would like to use the module's features for these entities, then add a new before commit event handler to these entities which runs the 'BCo_File_Process' microflow.
- When implementing the module in a live environment (acceptance or production for instance) then make sure that the ‘Public Root URL’ of your application is filled out. The module needs this URL to be able to display images. When running locally, Mendix fills out this value for you by default.
Optional installation steps
- In theory, all the resources needed to implement the module, can be found in the USE_ME folder in the ‘project explorer’. When you make changes to these files, first copy them to one of your own modules and edit and use the copied version.
- Take note of the number of objects in the FileHelper table as it may lead to database growth, depending on your implementation. Regular clean-up actions may be advised.
- In the Mendix Modeler, open the ‘Layout_Cloudmersive’ layout, which is located in the USE_ME folder in the Cloudmersive module. On the right-hand side in the ‘properties’ pane, go to ‘Master layout’ and select the dominant layout used throughout your project. In this way, the styling of the pages on which the Cloudmersive module is managed, will use the same page layout as your other pages which ensures visual consistency.
- Change the value of the @Cloudmersive.EncryptionKey constant. The key should contain 16 characters.
Configuration
Run your project and request your free API key. Follow the instructions of the sign-up video tutorial. Generate your API key from your personal dashboard on Cloudmersive's website. If you registered your Cloudmersive account by clicking the 'Signup for a free plan (no payment details required)' button in the Mendix module, then you are ready to make your first call, since your API key will be automatically imported. You can also copy your API key from Cloudmersive's portal and paste it on the module's 'Settings' page on the 'Account' tab in the 'API key' field and by hitting the 'Save' button. In boths ways, your API key will be encrypted before storing it into the database to improve overall security. For every call, the module will decrypt the API key. We have provided you with a default encryption key, which you can change by looking for the @Cloudmersive.EncryptionKey constant. You are now done implementing the module.
Further configuration can be performed from the ‘Settings’ page, which you can reach from the Cloudmersive dashboard page in the module. Here you can configure the module’s behavior, such as virus scanning upon file upload, checking for file MIME type upon upload, checking for NSFW content upon upload and much more.
Dependencies
- Community commons (https://appstore.home.mendix.com/link/app/170/Mendix/Community-Commons-Function-Library)
- Image viewer widget (https://appstore.home.mendix.com/link/app/65122/Mendix/Image-viewer)
- Optional: mx model reflection to use the token replace feature (https://appstore.home.mendix.com/link/app/69/Mendix/Mx-Model-reflection)
- Optional: markdown viewer widget to preview files (https://appstore.home.mendix.com/link/app/100051/Mendix/Markdown-Viewer)