Uppy-server is a server integration for Uppy file uploader.
It handles the server-to-server communication between your server and file storage providers such as Google Drive, Dropbox, Instagram, etc.
As of now uppy-server is integrated to work with:
npm install uppy-server
Once uppy-server is insatlled you need to set the following environment variables
export UPPY_ENDPOINT="YOUR UPPY CLIENT URL"export UPPYSERVER_DOMAIN="YOUR SERVER DOMAIN"export UPPYSERVER_PROTOCOL="YOUR SERVER PROTOCOL"# If used with Dropboxexport UPPYSERVER_DROPBOX_KEY="YOUR DROPBOX KEY"export UPPYSERVER_DROPBOX_SECRET="YOUR DROPBOX SECRET"# If used with Google Driveexport UPPYSERVER_GOOGLE_KEY="YOUR GOOGLE KEY"export UPPYSERVER_GOOGLE_SECRET="YOUR GOOGLE SECRET"# If used with Instagram Driveexport UPPYSERVER_INSTAGRAM_KEY="YOUR INSTAGRAM KEY"export UPPYSERVER_INSTAGRAM_SECRET="YOUR INSTAGRAM SECRET"
If you want to store uploads on your server's local disk, please set the following env variable as well
export UPPYSERVER_DATADIR="PATH/TO/UPLOAD/DIRECTORY "
Please ensure that the required env varaibles are set before runnning/using uppy-server. See.
var express =var bodyParser =var uppy =var app =app...// be sure to place this anywhere after app.use(bodyParser.json())app
To enable uppy socket for realtime feed to the client while upload is going on, you call the
socket method like so.
...var server = appuppy
If you cloned the repo from gtihub and want to run it as a standalone server, you may also run the following command from within its directory
npm run start:production
As of now, uppy-server supports both Google Drive and Dropbox out of the box, but you may also
choose to add your custom providers. You can do this by passing the
when calling the uppy
let options =customProviders:myprovidername:config:authorize_url: ""access_url: ""oauth: 2key: "[CLIENT_ID]"secret: "[CLIENT_SECRET]"scope: "read" "write"module:uppy
customProviders option should be an object containing each custom provider.
Each custom provider would in turn be an object with two keys,
config option would contain Oauth API settings, while the
module would point to the provider module.
git clone && cd uppy-server && npm install
env.shand edit it to its correct values.
cp env.example.sh env.sh$EDITOR env.sh
npm run start
This would get the uppy-server running on
It also expects the uppy client to be running on
All the secrets are stored in
env.infra.sh, so using
env.infra.example.sh, you could
use the same Freyfile but target a different cloud vendor with different secrets, and run your own
Requires Frey, if you haven't set it up yet type
npm run install:frey
afterwards, production logs are available through:
npm run logtail
This requires at least the
FREY_ENCRYPTION_SECRET key present in your