Closed eteamin closed 7 years ago
The most frequently used storage system when working with TurboGears2 is filedepot https://depot.readthedocs.io/en/latest/ which provides a TurboGears example https://github.com/amol-/depot/tree/master/examples/turbogears with guidance on how to setup filedepot in TurboGears itself.
The proposed implementation is also something that the user can probably achieve just be writing files into tg.config['paths']['static_files']
and I don't feel it should be part of TG itself, maybe you want to propose it as a pull request for https://github.com/TurboGears/tgext.utils ? That would be a better suiting place for such feature.
I assume Turbogears lacks a storage manager for storing files on disk which an API similar to something below
from tg import storage
filename = storage.store(file)
and files are stored in
public
folder by default in a folder namedstorage
. I am willing to add this feature if it's ok with you.