def upload_form(): #WORKS
    """
    In GET request
        - Displays upload form.
    """
    if request.method == 'GET':
        if 'user' not in session:
            return redirect(url_for('login_form'))
        is_admin = (requests.get(url='http://127.0.0.1:8080/is-admin/{}'.format(session['user'])).content).decode("utf-8") # Done
        if is_admin == "True":
            abort(403)
        upload_page = ((requests.get(url='http://127.0.0.1:8080/html/{}'.format('upload.html'))).content).decode("utf-8")
        return render_template_string(upload_page)
    """
    In POST request
        - Accepts video from user.
    """
    if request.method == 'POST':
        if 'user' not in session:
            return redirect(url_for('login_form'))
        is_admin = (requests.get(url='http://127.0.0.1:8080/is-admin/{}'.format(session['user'])).content).decode("utf-8") # Done
        if is_admin == "True":
            abort(403)
        file = request.files['file']
        username = session['user']
        title = request.form['title']
        if file and allowed_file(file.filename):
            video_ID = ((requests.post(url='http://127.0.0.1:8080/upload', data={'username' : username, 'title' : title, 'file' : base64.b64encode(file.read())})).content).decode("utf-8") # Done
            return redirect(url_for('watch_video', v = video_ID))
        else:
            return redirect(url_for('upload_form'))