>
> Hi James,
>
>
Thanks for suggesting me the page at location  
https://docs.djangoproject.com/en/1.8/topics/http/file-uploads/ 
<https://www.google.com/url?q=https%3A%2F%2Fdocs.djangoproject.com%2Fen%2F1.8%2Ftopics%2Fhttp%2Ffile-uploads%2F&sa=D&sntz=1&usg=AFQjCNGVhFdVuO7uOlelOT6W7AHnDXlyPg>.
 
I visited that page and as you suggested, there was no need of database in 
between, However, I noted that we have to manually write the file as shown 
in snippet given below(copied from url suggested by you)

def handle_uploaded_file(f):
    with open('some/file/name.txt', 'wb+') as destination:
        for chunk in f.chunks():
            destination.write(chunk)


So, I mean, Isn't there any way through which this file writing operation takes 
places automatically in django. Moreover, you note that here, filepath is 
hard-coded. I want that it file uploaded by user, must be copied at MEDIA_ROOT 
variable set in settings.py of project.

 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9b9e962d-84a4-4344-b0a1-452623ac0db4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to