M
M
matveyvarg2016-04-14 19:11:18
Django
matveyvarg, 2016-04-14 19:11:18

What are the pros and cons of uploading files to a server using a model?

I want to implement uploading files to the server, I wanted to know the pros and cons of uploading using FileField and without it. Personally, for my purposes, it’s more suitable without FileField for now (or I didn’t understand how to do it using FileField). But before relying completely on this method, I would like to know its advantages and disadvantages. At least briefly.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pahaz, 2016-04-22
@pahaz

Your question looks rather strange. Downloading files in a simple approximation looks like saving a file to a file system. If you are using a FileField, then this allows you to store the addresses of uploaded files in the database. in addition, Django uses an abstraction for file storage, which makes it quite easy to change storage and store files, for example in Amazon S3 or GridFS.
The same can be written by hand. You need to describe your task more precisely, then it will be possible to give you practical advice.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question