attachment

Irmen de Jong irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Sun Mar 7 08:41:20 EST 2004


ketulp_baroda at yahoo.com wrote:

> User can submit any attachment and can view all the attachments
> submitted by other users.
> Attachment contents can be anything.
> So where should I store the attachment 1)In database 2)In a file on
> server

You give too little information to provide a conclusive answer.

However,

Putting stuff in a database can be complicated (BLOBs and stuff)
but usually takes care of concurrency control (i.e. accessing the
data by multiple users at the same time; everyone should only
see THEIR file(s)).

Storing stuff in the filesystem is by far the easiest. You don't
have to set up and access a database. But you DO have to make sure
that each file is uniquely named (you don't want me to overwrite
your 'curriculum.doc' now do you) and probably have to do
some concurrency control yourself.
Also you have to think of a way to identify which files belong
to which user, and make sure that user A cannot access user B's files.

--Irmen




More information about the Python-list mailing list