Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
fh-wfm-file
Advanced tools
A module for FeedHenry RainCatcher that manages files. It provides :
See raincatcher-file-angular module for angular client side implementation
This module is packaged in a CommonJS format, exporting the name of the Angular namespace. The module can be included in an angular.js as follows:
var fileCore = require('fh-wfm-file/lib/client');
fileCore(mediator,{},$fh);
Creating a new File
var parameters = {
fileToCreate: {
//A Valid JSON Object
},
//Optional topic unique identifier.
topicUid: "uniquetopicid"
}
mediator.publish("wfm:files:create", parameters);
List All files
var parameters = {
userId : "userId"
//Optional topic unique identifier.
topicUid: "uniquetopicid"
}
mediator.publish("wfm:files:list", parameters);
The server-side component of this WFM module exports a function that takes express and mediator instances as parameters, as in:
var express = require('express')
, app = express()
, mbaasExpress = mbaasApi.mbaasExpress()
, mediator = require('fh-wfm-mediator/lib/mediator')
;
// configure the express app
...
// setup the wfm user router
require('fh-wfm-file/lib/cloud')(mediator, app);
Base url : /file/wfm
resource | method | returns |
---|---|---|
/all | GET | array of files |
/owner/:owner | GET | filtered array of files |
/owner/:owner/upload/base64/:filename | POST | file metadata |
/upload/binary | POST | file metadata |
{
owner: req.params.owner,
name: req.params.filename,
uid: uuid.create().toString()
}
By default file module would store files in filesystem temporary folder.
Allows to store files in AWS S3 buckets.
Options:
var storageConfig = {
s3: {
s3Options: {
accessKeyId: process.env.AWS_S3_ACCESS_KEY,
secretAccessKey: process.env.AWS_S3_ACCESS_KEY_SECRET,
region: process.env.AWS_S3_REGION
},
bucket: "raincatcher-files"
}
}
require('fh-wfm-file/lib/cloud')(mediator, storageConfig);
Allows to store file in MongoDB database using Gridfs driver
Options:
var storageConfig = {
gridFs: {
mongoUrl: "mongodb://localhost:27017/files"
}
};
require('fh-wfm-file/lib/cloud')(mediator, storageConfig);
FAQs
A WFM module providing client and backend for file support
We found that fh-wfm-file demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.