Legitimate way to allow uploading of folders

35 views
Skip to first unread message

ranvir singh

unread,
Jun 22, 2017, 11:06:01 AM6/22/17
to Django users
Hell there,

I am an intermediate user of Django and have been using this since last summer. Recently I encountered a situation in which I wanted to make an app which allows the user to upload a folder. I have already set up the views and template and it is working for a single file. I know there is documentation to make it work for multiple files, but by surfing the internet I wasn't able to find a good method to upload directories through a single field. 

I did find some solutions which asked to add some JavaScript code or something. I want to know is that, Is there some legitimate way to do this?

Thank you for your contributions.

Mandeep Tondak

unread,
Jun 22, 2017, 12:24:41 PM6/22/17
to django...@googlegroups.com
You can use zip folder for that.

--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/60f3b0a6-5b4e-49f1-a313-4755ebbfdb1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ranvir singh

unread,
Jun 22, 2017, 1:10:57 PM6/22/17
to Django users
On Thursday, June 22, 2017 at 9:54:41 PM UTC+5:30, mandeep444 wrote:
You can use zip folder for that.

Are you saying that we allow only zip files to be uploaded by the user. 

Mandeep Tondak

unread,
Jun 22, 2017, 1:33:56 PM6/22/17
to django...@googlegroups.com
As per my experience we can not upload folder but we can upload zip folder to server. You can unzip that folder and read all file and save to db.

--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Avraham Serour

unread,
Jun 22, 2017, 2:21:22 PM6/22/17
to django-users
The server can accept files, the frontend may allow the user to select a folder and send multiple files

Reply all
Reply to author
Forward
0 new messages