I am writing a Pylons-based download gateway. The gateway client will access the files by ID:
/file_gw/download/1
Internally, the file itself is accessible via HTTP from the internal file server:
http://internal-srv/path/to/file_1.content
Files can be quite large, so I want to transfer the contents. I store metadata about a file in a StoredFile model object:
class StoredFile(Base): id = Column(Integer, primary_key=True) name = Column(String) size = Column(Integer) content_type = Column(String) url = Column(String)
Given this, what is the best (that is: the most architectural-sound, performing, etc.) way to write my file_gw controller?
source share