Skip to content

Instantly share code, notes, and snippets.

@Ratheshprabakar
Created April 1, 2021 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ratheshprabakar/72e952c1e034adc89d9c942ca3185284 to your computer and use it in GitHub Desktop.
Save Ratheshprabakar/72e952c1e034adc89d9c942ca3185284 to your computer and use it in GitHub Desktop.
def update():
test_append = str(request.form['excel_folder'])
print(test_append)
teacher_name = str(session.get('user'))
print(teacher_name)
excel_dir = APP_ROOT + "/excel/" + test_append + "/" + teacher_name + "/"
print(excel_dir)
for file in request.files.getlist("updated_excel"):
print(file)
filename = file.filename
print(filename)
destination = "/".join([excel_dir,filename])
print(destination)
file.save(destination)
return render_template("excel.html",msg="updated successfully")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment