'Return a static resource from the shared folder.'

def get_resource(self, request, filename):

    filename = join(dirname(__file__), 'shared', basename(filename))
    if isfile(filename):
        mimetype = (mimetypes.guess_type(filename)[0] or 'application/octet-stream')
        f = open(filename, 'rb')
        try:
            return Response(f.read(), mimetype=mimetype)
        finally:
            f.close()
    return Response('Not    Found', status=404)
