Coder Social home page Coder Social logo

dropbox-media-server's Introduction

Dropbox Media Server

Node.js server that serves a public folder of media files on Dropbox

Why

Dropbox is a great means of hosting large files, but you can share only individual files, not individual links for a directory of files - the URLs for files are obfuscated for within folders.

This is a node.js server you can run on Heroku that exposes a directory without obfuscated paths, and redirects you to the appropriate file on Dropbox whenever you try to access a file.

Deploying on Heroku

Create a new app on Dropbox

Create a new app on Heroku

(Optional) Add either MongoHQ or MongoLab or MongoSoup to the app

Add to the Heroku app the config vars APP_KEY and APP_SECRET with the app key and secret from Dropbox (or if you added mongodb, you can alternatively specify the app key and secret by visiting the site after deploying it).

Deploy this repository to Heroku via git push:

git clone https://github.com/gkovacs/dropbox-media-server
cd dropbox-media-server
git remote add myapp [email protected]:myapp.git
git push myapp master

Visit your site at http://myapp.herokuapp.com and give it authorization. If you did not add mongodb, you will have to set the ACCESS_TOKEN heroku config var to output of the following:

heroku logs --app myapp | grep 'ACCESS_TOKEN'

Now you can add some files to the Dropbox folder at Dropbox/Apps/myapp and if you visit your site at http://myapp.herokuapp.com then it will show them.

Features

To list the files as JSON: /listfiles

To access a file: /f/path/to/file.txt

To see if mongo db has an error: /mongostatus

To password-protect with HTTP Basic Auth over HTTPS: Add Heroku config var "PASSWORDS", which is JSON with usernames as keys and values as passwords, ie {"user1": "password1", "user2": "password2"}

License

MIT License

Contact

Geza Kovacs

dropbox-media-server's People

Contributors

gkovacs avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.