I know how to upload multiple files through Django, but I have a problem when uploading a folder if there are subfolders in it. So I want the user to upload the folder and I get the root, dirs, and files of that folder the user upload.
HTML code:
<input type="file" name="file_name" multiple = "true" webkitdirectory="true" directory = "true"/>
python code:
def uploader_folder(request):
data = {}
if request.method == 'POST':
file = request.FILES.getlist('file_name')
for i in file:
print(i)
and here I received only file names. but I want to know the dir, or root path also