{"id":18411382,"url":"https://github.com/alfg/dropdot","last_synced_at":"2025-04-07T11:31:39.587Z","repository":{"id":7104509,"uuid":"8397037","full_name":"alfg/dropdot","owner":"alfg","description":":cloud: Direct Upload to Amazon S3 With CORS demo. Built with Node/Express","archived":false,"fork":false,"pushed_at":"2018-06-30T06:15:35.000Z","size":285,"stargazers_count":85,"open_issues_count":0,"forks_count":21,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T15:02:35.314Z","etag":null,"topics":["aws","demo","node","s3","upload"],"latest_commit_sha":null,"homepage":"http://dropdot.herokuapp.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alfg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-24T21:24:39.000Z","updated_at":"2025-02-05T10:05:24.000Z","dependencies_parsed_at":"2022-08-26T08:11:50.885Z","dependency_job_id":null,"html_url":"https://github.com/alfg/dropdot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fdropdot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fdropdot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fdropdot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fdropdot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alfg","download_url":"https://codeload.github.com/alfg/dropdot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247644079,"owners_count":20972221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","demo","node","s3","upload"],"created_at":"2024-11-06T03:36:39.758Z","updated_at":"2025-04-07T11:31:39.163Z","avatar_url":"https://github.com/alfg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dropdot #\n\nDropdot is a simple file uploader built on NodeJS, Express and S3 API as the object storage platform.\nIt supports AWS S3 and DreamHost Objects as storage provider.\n\nConfiguring Dropdot is simple, just follow the steps below:\n\n**AWS S3 Demo**: http://dropdot.herokuapp.com/\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\n## Installation\nClone and install dependencies\n\n```bash\n$ git clone https://github.com/alfg/dropdot.git\n$ cd dropdot\n$ npm install\n```\n\nOpen `config.js` and configure\n\n```javascript\nmodule.exports.port = 3000; // App port\nmodule.exports.aws_key = \"YourAWSKey\"; // AWS Key\nmodule.exports.aws_secret = \"YourSuperSecretAWSKey\"; // AWS Secret\nmodule.exports.aws_bucket = \"NameOfS3Bucket\"; // S3 bucket\nmodule.exports.redirect_host = \"http://localhost:3000/\"; // Redirect page after successful upload\nmodule.exports.host = \"YOUR_S3_PROVIDER\"; // S3 provider host\nmodule.exports.bucket_dir = \"uploads/\"; // Subdirectory in S3 bucket where uploads will go\nmodule.exports.max_filesize = 20971520; // Max filesize in bytes (default 20MB)\n```\n\nOr set your environment variables:\n```bash\nexport PORT=3000\nexport AWS_KEY=\u003cYourAWSKey\u003e\nexport AWS_SECRET=\u003cYourSuperSecretAWSKey\u003e\nexport AWS_BUCKET=\u003cNameOfS3Bucket\u003e\nexport REDIRECT_HOST=http://localhost:3000/\nexport HOST=\u003cYOUR_S3_PROVIDER\u003e\nexport BUCKET_DIR=uploads\n```\n\nRun the app\n```bash\n$ node app.js\n```\n\nLoad `http://localhost:3000` into the browser\n\nThe app is set, now you need to create and configure your S3 Bucket.\n\n## Configuring your S3 Bucket\nIn order to allow S3 to accept CORS uploads from your app, it needs to be properly configured.\n\n## AWS S3\nLog into your S3 Console and create a bucket.\n\nRight-click your bucket and go to properties \u003e permissions \u003e **Edit CORS Configuration**.\n\nEnter the following:\n\n```xml\n\u003cCORSConfiguration\u003e\n    \u003cCORSRule\u003e\n        \u003cAllowedOrigin\u003e*\u003c/AllowedOrigin\u003e\n        \u003cAllowedMethod\u003ePUT\u003c/AllowedMethod\u003e\n        \u003cAllowedMethod\u003eGET\u003c/AllowedMethod\u003e\n        \u003cAllowedMethod\u003ePOST\u003c/AllowedMethod\u003e\n        \u003cMaxAgeSeconds\u003e3000\u003c/MaxAgeSeconds\u003e\n        \u003cAllowedHeader\u003e*\u003c/AllowedHeader\u003e\n    \u003c/CORSRule\u003e\n\u003c/CORSConfiguration\u003e\n```\nOf course, the * in AllowedOrigin is only for development. Be sure to use your domain when going public.\n\n## DreamObjects S3\nSee: https://help.dreamhost.com/hc/en-us/articles/216201557-How-to-setup-Cross-Origin-Resource-Sharing-CORS-on-DreamObjects\n\n\n## CNAME your S3 bucket (optional)\n\nObjects will be available by accessing the public URL directly. Example:\n`http://bucket-name.s3.amazonaws.com/uploads/439fbca8-b79b-40e9-8172-4d318737ee14_file.jpg`\n\nHowever, if you wish to customize the URL, you can use a CNAME. First, create/rename your bucket to match the\nsubdomain (`uploads.domain.com`). Then create the CNAME (via your DNS settings) using the exact name of the \nbucket/subdomain.\n\nTo be clear, the bucket's name and CNAME should be identical. i.e. `uploads.domain.com`\n\nYou can now access your files as:\n`http://uploads.domain.com/uploads/439fbca8-b79b-40e9-8172-4d318737ee14_file.jpg`\n\n## That's it!\nAll done! Now go upload stuff.\n\n## License\nDropdot is open-source under the [MIT License][1].\n\n## Credits\nDropdot uses the following technologies, check them out!\n* [NodeJS][2] The core backend\n* [Express][3] Framework for Node. Serves the JSON policy\n* [mime][4] Mime-type detection\n* [crypto][5] Used for SHA1, Base64 digestion\n* [uuid][6] Generating the unique IDs\n* [Amazon S3][8] Cloud Object/File Storage Platform\n\nGuides that saved me a few gray hairs dealing with CORS:\n\n* http://pjambet.github.com/blog/direct-upload-to-s3/\n* http://aws.amazon.com/articles/1434\n\n[1]: http://opensource.org/licenses/MIT\n[2]: http://nodejs.org\n[3]: http://expressjs.com/\n[4]: https://github.com/broofa/node-mime\n[5]: http://nodejs.org/api/crypto.html\n[6]: https://github.com/broofa/node-uuid\n[7]: http://foundation.zurb.com\n[8]: http://aws.amazon.com/s3/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfg%2Fdropdot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falfg%2Fdropdot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfg%2Fdropdot/lists"}