def upload(): insert_photo( request ) # Call function in 'models.py' to process the database transaction upload_photo(request.files['photo'] ) # Call function in 'models.py' to upload photo to ECS return render_template( 'submit-photo.html' ) # Return a page to inform the user of a successful upload
def upload(): filename = secure_filename(request.files['photo'].filename) uuid = "%s-%s-" % (time.time(), HOSTNAME) filename = uuid + filename insert_photo( request, filename ) # Call function in 'models.py' to process the database transaction upload_photo( request.files['photo'], filename) # Call function in 'models.py' to upload photo to ECS # Return a page to inform the user of a successful upload return render_template('submit-photo.html')