Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including dropdot with all npm packages installed. Try it out:

dropdot lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("dropdot/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

dropdot v0.1.0

Simple file uploading application


Dropdot is a simple file uploader built on NodeJS, Express and S3 API as the object storage platform. It supports AWS S3 and DreamHost Objects as storage provider.

Configuring Dropdot is simple, just follow the steps below:

AWS S3 Demo:



Clone and install dependencies

$ git clone
$ cd dropdot
$ npm install

Open config.js and configure

module.exports.port = 3000; // App port
module.exports.aws_key = "YourAWSKey"; // AWS Key
module.exports.aws_secret = "YourSuperSecretAWSKey"; // AWS Secret
module.exports.aws_bucket = "NameOfS3Bucket"; // S3 bucket
module.exports.redirect_host = "http://localhost:3000/"; // Redirect page after successful upload = "YOUR_S3_PROVIDER"; // S3 provider host
module.exports.bucket_dir = "uploads/"; // Subdirectory in S3 bucket where uploads will go
module.exports.max_filesize = 20971520; // Max filesize in bytes (default 20MB)

Or set your environment variables:

export PORT=3000
export AWS_KEY=<YourAWSKey>
export AWS_SECRET=<YourSuperSecretAWSKey>
export AWS_BUCKET=<NameOfS3Bucket>
export REDIRECT_HOST=http://localhost:3000/
export BUCKET_DIR=uploads

Run the app

$ node app.js

Load http://localhost:3000 into the browser

The app is set, now you need to create and configure your S3 Bucket.

Configuring your S3 Bucket

In order to allow S3 to accept CORS uploads from your app, it needs to be properly configured.


Log into your S3 Console and create a bucket.

Right-click your bucket and go to properties > permissions > Edit CORS Configuration.

Enter the following:


Of course, the * in AllowedOrigin is only for development. Be sure to use your domain when going public.

DreamObjects S3


CNAME your S3 bucket (optional)

Objects will be available by accessing the public URL directly. Example:

However, if you wish to customize the URL, you can use a CNAME. First, create/rename your bucket to match the subdomain ( Then create the CNAME (via your DNS settings) using the exact name of the bucket/subdomain.

To be clear, the bucket's name and CNAME should be identical. i.e.

You can now access your files as:

That's it!

All done! Now go upload stuff.


Dropdot is open-source under the MIT License.


Dropdot uses the following technologies, check them out!

  • NodeJS The core backend
  • Express Framework for Node. Serves the JSON policy
  • mime Mime-type detection
  • crypto Used for SHA1, Base64 digestion
  • uuid Generating the unique IDs
  • Amazon S3 Cloud Object/File Storage Platform

Guides that saved me a few gray hairs dealing with CORS:



RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free