Commit be2fbb69 authored by G.M. Amashi S. Bastiansz's avatar G.M. Amashi S. Bastiansz 🎯

Added new comments to component files

parent 15f99512
"""
This file is used to display the created GIF to user
This file is still at testing phase
This file is still at TESTING PHASE
@author Amashi Bastiansz | IT17143950
@version 1.2
......@@ -22,7 +23,7 @@ app = Flask(__name__)
def allowed_file(filename):
"""
This method is used check the extension of created file
This method is used check the extension of selected file
@return the extension to check whether it is allowed
"""
......@@ -33,9 +34,10 @@ def allowed_file(filename):
@app.route('/', methods=['POST'])
def upload_image():
"""
This method is used check the extension of created file
This method is used upload the selected file to the exact folder
after checking whether the extensions are matched.
@return the extension to check whether it is allowed
@return redirect to upload.html
"""
if 'file' not in request.files:
......@@ -57,6 +59,11 @@ def upload_image():
@app.route('/display/<filename>')
def display_image(filename):
"""
This method is used display the uploaded file back to the user
@return display the file in the interface
"""
return redirect(url_for('static', filename='uploads/' + filename), code=301)
......
########################## To display the created GIF to user #############################
"""
This file is used to display the created GIF to the user on the interface
Still in TESTING phase
@author Amashi Bastiansz | IT17143950
@version 1.5
@since 2020-10-01
"""
from flask import Flask
main = Flask(__name__)
# create and initialize a new folder to upload created GIFS
UPLOAD_FOLDER = 'static/uploads/'
main.secret_key = "secret key"
......
<!--IT17143950 16-05-2020
1, Created
for testing purposes... Do not edit without permission -->
<!--
* The file is to create a form for Text to SSL Translator
* For TESTING purposes
*
* @author Amashi Bastiansz | IT17143950
* @version 1.0
* @since 2020-05-31
-->
<!DOCTYPE html>
<html>
......
<!--To display the created GIF to user -->
<!--
* The file is to create a form for uploading and display files
* For TESTING purposes
*
* @author Amashi Bastiansz | IT17143950
* @version 1.0
* @since 2020-10-01
-->
<!doctype html>
<html>
......
<!--IT17143950 16-05-2020
1, Created
for testing purposes... Do not edit without permission -->
<!--
* The file is to create a form for Text to SSL Translator
* For TESTING purposes
*
* @author Amashi Bastiansz | IT17143950
* @version 1.0
* @since 2020-10-01
-->
<!DOCTYPE html>
<html>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment