Function in python to accept a local folder Function in python to accept a local folder flask flask

Function in python to accept a local folder


If you only need the name of the folder (uploads in this case) you can get it from the list of files in your files variable like this:

from os.path import dirnamefiles = request.files.getlist('files')folder = dirname(files[0].filename)