All Projects → alfg → Dropdot

alfg / Dropdot

☁️ Direct Upload to Amazon S3 With CORS demo. Built with Node/Express

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Dropdot

Scrapy S3pipeline
Scrapy pipeline to store chunked items into Amazon S3 or Google Cloud Storage bucket.
Stars: ✭ 57 (-34.48%)
Mutual labels:  aws, s3
S3 Blob Store
☁️ Amazon S3 blob-store
Stars: ✭ 66 (-24.14%)
Mutual labels:  aws, s3
S3reverse
The format of various s3 buckets is convert in one format. for bugbounty and security testing.
Stars: ✭ 61 (-29.89%)
Mutual labels:  aws, s3
Simple S3 Setup
Code examples used in the post "How to Setup Amazon S3 in a Django Project"
Stars: ✭ 46 (-47.13%)
Mutual labels:  aws, s3
Locopy
locopy: Loading/Unloading to Redshift and Snowflake using Python.
Stars: ✭ 73 (-16.09%)
Mutual labels:  aws, s3
Aws Testing Library
Chai (https://chaijs.com) and Jest (https://jestjs.io/) assertions for testing services built with aws
Stars: ✭ 52 (-40.23%)
Mutual labels:  aws, s3
React Deploy S3
Deploy create react app's in AWS S3
Stars: ✭ 66 (-24.14%)
Mutual labels:  aws, s3
Awslib scala
An idiomatic Scala wrapper around the AWS Java SDK
Stars: ✭ 20 (-77.01%)
Mutual labels:  aws, s3
Aws Inventory
Python script for AWS resources inventory (cheaper than AWS Config)
Stars: ✭ 69 (-20.69%)
Mutual labels:  aws, s3
Cloud Security Audit
A command line security audit tool for Amazon Web Services
Stars: ✭ 68 (-21.84%)
Mutual labels:  aws, s3
Aws Data Replication Hub
Seamless User Interface for replicating data into AWS.
Stars: ✭ 40 (-54.02%)
Mutual labels:  aws, s3
Direct Upload
Composer Package to Direct Upload to S3
Stars: ✭ 84 (-3.45%)
Mutual labels:  aws, upload
Aws S3 Scala
Scala client for Amazon S3
Stars: ✭ 35 (-59.77%)
Mutual labels:  aws, s3
Aws Utilities
Docker images and scripts to deploy to AWS
Stars: ✭ 52 (-40.23%)
Mutual labels:  aws, s3
Workshop Donkeytracker
Workshop to build a serverless tracking application for your mobile device with an AWS backend
Stars: ✭ 27 (-68.97%)
Mutual labels:  aws, s3
Terraform Aws S3 Log Storage
This module creates an S3 bucket suitable for receiving logs from other AWS services such as S3, CloudFront, and CloudTrail
Stars: ✭ 65 (-25.29%)
Mutual labels:  aws, s3
S3 Deploy Website
Deploy website to S3/CloudFront from Python
Stars: ✭ 26 (-70.11%)
Mutual labels:  aws, s3
Step Functions Demo
This is a demo project, created as a part of the blog post. The project uses serverless for deployments.
Stars: ✭ 15 (-82.76%)
Mutual labels:  aws, demo
Aws
Swift wrapper around AWS API
Stars: ✭ 67 (-22.99%)
Mutual labels:  aws, s3
Awesome Sec S3
A collection of awesome AWS S3 tools that collects and enumerates exposed S3 buckets
Stars: ✭ 76 (-12.64%)
Mutual labels:  aws, s3

Dropdot

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: http://dropdot.herokuapp.com/

Deploy

Installation

Clone and install dependencies

$ git clone https://github.com/alfg/dropdot.git
$ 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
module.exports.host = "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 HOST=<YOUR_S3_PROVIDER>
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.

AWS S3

Log into your S3 Console and create a bucket.

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

Enter the following:

<CORSConfiguration>
    <CORSRule>
        <AllowedOrigin>*</AllowedOrigin>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedMethod>GET</AllowedMethod>
        <AllowedMethod>POST</AllowedMethod>
        <MaxAgeSeconds>3000</MaxAgeSeconds>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
</CORSConfiguration>

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

DreamObjects S3

See: https://help.dreamhost.com/hc/en-us/articles/216201557-How-to-setup-Cross-Origin-Resource-Sharing-CORS-on-DreamObjects

CNAME your S3 bucket (optional)

Objects will be available by accessing the public URL directly. Example: http://bucket-name.s3.amazonaws.com/uploads/439fbca8-b79b-40e9-8172-4d318737ee14_file.jpg

However, if you wish to customize the URL, you can use a CNAME. First, create/rename your bucket to match the subdomain (uploads.domain.com). 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. uploads.domain.com

You can now access your files as: http://uploads.domain.com/uploads/439fbca8-b79b-40e9-8172-4d318737ee14_file.jpg

That's it!

All done! Now go upload stuff.

License

Dropdot is open-source under the MIT License.

Credits

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:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].