-from bottle import Bottle, route, run, post, get, put, delete, request, abort
+from bottle import Bottle, route, run, post, get, put, delete, request, abort, static_file
import os, time
import json
from config import load_config, save_config
def file_info(filename):
return json.dumps(files_info[filename])
+@get('/files/<filename>/data')
+def file_data(filename):
+ return static_file(filename, root=cagibi_folder)
+
@post('/files/<filename>/deltas')
def return_deltas(filename):
"""return the deltas corresponding to the file. The client must send in its request the hashes of the file"""