npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

formio-upload

v1.2.0

Published

A file upload server/proxy for use with Form.io File components

Readme

Form.io File Upload Server

This library provides an Upload Server/Proxy for use with the Form.io File Component and URL configuration. This allows for Private file upload and downloads by sending Authentication requests to the Form.io API Server to determine if a user has permissions to upload or download based on their access to either Submit the form, or fetch the Submission JSON respectively.

Getting Started

This library can be ran within 3 different environments.

  1. Locally using Node.js
  2. Docker container
  3. AWS Lambda

Running locally with Node.js

In order to run this server locally, you can type the following within your terminal.

npm install
node index

Running within Docker

To run this with docker, you can use the following commands.

docker run -itd \
  -e "PORT=4100" \
  -e "MAX_UPLOAD_SIZE=16mb" \
  -e "DEBUG=*" \
  -e "PROVIDERS=file,alfresco" \
  -e "UPLOAD_DIR=" \
  -e "ALFRESCO_USER=admin" \
  -e "ALFRESCO_PASS=admin" \
  -e "ALFRESCO_HOST=http://127.0.0.1:8082" \
  --restart unless-stopped \
  --name formio-upload \
  -p 4100:4100 \
  formio/formio-upload

Running within AWS Lambda

Before you can run with AWS Lambda, you must first install Claudia.

npm install claudia -g

Next, you will want to configure your access credentials to the AWS CLI. You can do this by following the instructions @ https://claudiajs.com/tutorials/installing.html

Once you have access setup, you can now modify the deploy scripts within package.json to change where this script will be deployed. Once you have made changes to the deploy script within package.json, you can now run the following to deploy this within AWS Lambda using the deploy script.

npm run deploy

Environment Variables.

You must use Environment variables to configure the runtime operation of this server. When running this server locally using Node.js, you can set the Environment variables within the .env file. These variables are defined as follows.

| Variable | Description | Default | |----------|-------------|---------| | PORT | The port you wish to run the server on. | 4100 | | MAX_UPLOAD_SIZE | The maximum upload size for files being uploaded. | 16mb | | DEBUG | Enables debugging | * | | PROVIDERS | Determines which upload providers are enabled. This is a CSV of the providers you wish to enable. For example "file,alfresco" will enable both local file uploads as well as Alfresco ECM uploads. | file | | UPLOAD_DIR | When using the "file" provider, this is the local upload base directory. | providers/uploads | | ALFRESCO_USER | When using the Alfresco provider, this is the user account to log into the Alfresco ECM | admin | | ALFRESCO_PASS | When using the Alfresco provider, this is the user account password to log into the Alfresco ECM | admin | | ALFRESCO_HOST | When using the Alfresco provider, this is the Alfresco ECM server URL | http://127.0.0.1:8082 |

Configure Form Upload

Now that you have the server running, you can configure a Form.io Form with a new File component.

Alt text

Within the configuration of this File component, you will need to set the file upload type to URL and then provide the URL of this service. You can decide which upload provider to use based on the path you provide to the url of the running server.

For example:

  • http://localhost:4100/file - Uses the local file upload provider.
  • http://localhost:4100/alfresco - Uses the Alfresco ECM upload provider.

You will also need to make sure you check Private Download. Your configuration should look something like the following.

Alt text

The upload will now function against this server.