Flask gives IsADirectoryError: [Errno 21] Is a directory

Solution
file.save(os.path.join(app.config['UPLOAD_FOLDER']),file_name)
file.save(os.path.join(app.config['UPLOAD_FOLDER'],file_name))