1. Simple and free file storage for your website using Dropbox and Google App Engine

    by Arjun Sreedharan

    Hi folks,

    I wanted to host some files on my this website which i host on tumblr.
    So, i decided to put them on dropbox and write a simple python app hosted on google app engine that serves them.
    Finally, pointed one of my subdomains to the python app - so i can host stuff in my domain like files.arjunsreedharan.org/test

    I have put the code on Github: arjun024/pystorage

    To use for your website, all your need to do is specify your dropbox user-id and the name of the folder you wish to store your content.
    Read on.

    What services we use here

    How we build our environment

    Dropbox

    • Create a dropbox account.
    • Create a folder inside your “Public” directory.
    • Create a test file inside that folder, Right-click and view its public url and find out your user-id.
      (public url will be of the syntax: dl.dropboxusercontent.com/u/<USERID>/<YOURFOLDER>/testfile)
    • Input user-id and folder-name as variable values in index.py.
    DROPBOX_USERID = "<USERID>"
    DROPBOX_FOLDER = "<YOURFOLDER>"
    

    Google App Engine

    • Create a Google App Engine account.
    • register a unique app-id.
    • now your application will run at <app-id>.appspot.com
    • Dowload Python and Google App Engine SDK
    • Download source files of pystorage project from github. (here)
    • Select “src” folder as the project folder in the GAE SDK.
    • Deploy it to App Engine.

    Example

    http://py-storage.appspot.com/test

    This serves the file ‘test’ that is located in the specified folder of my Dropbox’s Public directory.

    Access the files under your own domain

    • Let’s say you want to acces the test file as <files.yourwebsite.com>/test
    • Login to your App Engine, set custom domain for your app as <files.yourwebsite.com>
    • In your website’s DNS settings: point CNAME record for <files.yourwebsite.com> to ghs.googlehosted.com
    • You’re done.








  2. Disclaimer: The views expressed here are solely those of the author in his private capacity and do not in any way represent the views of the author's employer or any organization associated with the author.




















































Interesting Things:
exploresion.org







Recent Posts:
Simplicity is the ultimate sophistication. (Leonardo Da Vinci)
©
Arjun Sreedharan 2013