make files controller index to respond to JS requests